Results 1 to 2 of 2
  1. #1
    sesproul is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Posts
    50

    Does Anyone have the code to connect to the localDB from within VBA in ACCESS. ADODB


    Hello,

    I've got Access 2007, and I am trying to connect to the DB that the VBA is running in (The local DB) how is this accomplished. or is there a prefered method to work with Recordsets from within the ACCESS program.


    I am only familiar with connecting to remote objects, and Databases with code, not looking into the database I am "on".


    Steve

  2. #2
    sesproul is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Posts
    50
    This seems to be the answer:


    Dim oconn as Adodb.connection
    Set oconn = CurrentProject.Connection

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 03-29-2009, 07:20 AM
  2. how to connect ms access to sql
    By marianne in forum Access
    Replies: 22
    Last Post: 03-24-2009, 11:14 AM
  3. Replies: 0
    Last Post: 03-09-2009, 12:20 PM
  4. connect from access to sql
    By kathyc in forum Programming
    Replies: 0
    Last Post: 09-28-2008, 12:50 PM
  5. Replies: 3
    Last Post: 04-05-2006, 04:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums