1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Access 2000 ADO CurrentProject Connection

Discussion in 'Business Applications' started by aktell, Feb 8, 2005.

Thread Status:
Not open for further replies.
  1. aktell

    aktell Thread Starter

    Jan 20, 2005
    Hi there,

    Can anybody be of any HELP. I would like to figure out the following.

    Insteat of using any wizards or else I would like to connect some text boxes "within" Access 2000 with VBA. I have two tables which I like to connect to and fill my text boxes.
    There are some ideas I have but ................
    My concern is what Sub Procedure do I take in VBA ??? etc.

    I got the following from an MS Site.
    Dim cnn As ADODB.Connection
    Dim rst As ADODB.Recordset
    Set cnn = CurrentProject.Connection
    Set rst = New ADODB.Recordset
    With rst
    ' Open table-type Recordset object.
    .Open Source:=strTblName, _
          ActiveConnection:=cnn, _
          CursorType:=adOpenKeyset, _
          LockType:=adLockOptimistic, _
    'How do  I specify my tables and than of course my text boxes etc. ???
    Set cnn = Nothing
    End Sub
    Thanks aktell :confused:
  2. Rockn


    Jul 29, 2001
    You recordset is empty because you have not told it what to populate it with other than the table name. Create a SELECT statement based on the two tables.
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/328024

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice