Results 1 to 4 of 4
  1. #1
    jasonbarnes is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2010
    Location
    NC
    Posts
    56

    MyRecordset.Open Question

    What is the proper syntax to reference a table in your database? Currently I'm using

    Set MyRecordSet = New ADODB.Recordset
    MyRecordSet.Open "TestData", CurrentProject.Connection



    This errors out saying invalid SQL statement. The example in the book I'm using obviously doesn't use one and I would rather not.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Did you intend to mark this as Solved?

  3. #3
    jasonbarnes is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2010
    Location
    NC
    Posts
    56
    Yeah. Had my table name wrong.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Thanks for the update.

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

Similar Threads

  1. How do I open another database using VBA?
    By avarusbrightfyre in forum Programming
    Replies: 2
    Last Post: 09-15-2010, 07:18 PM
  2. ADO Recordset.Open (SQL) does nothing
    By workindan in forum Programming
    Replies: 3
    Last Post: 06-23-2010, 02:07 PM
  3. Replies: 2
    Last Post: 02-26-2010, 08:14 AM
  4. Replies: 1
    Last Post: 06-04-2009, 07:43 AM
  5. Form will not open
    By dserbanescu in forum Forms
    Replies: 0
    Last Post: 01-09-2008, 09:48 AM

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