Results 1 to 5 of 5
  1. #1
    jgelpi16 is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544

    Question Invalid database object reference.

    I have a function that executes three queries. When I try to execute the queries I receive:

    "Run-time error '3276': Invalid database object reference."



    Below is my code. I have checked my tables, they are all fine. I haven't run into this error before and don't really know where to start. Thanks in advance.

    Code:
        Dim vQueryName As String
        
        DoCmd.SetWarnings False
        vQueryName = "qryAppend_HIST"
        DoCmd.OpenQuery vQueryName, acViewNormal

  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
    Are you sure you have the name of the query right?

  3. #3
    jgelpi16 is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    Yes, I had the name of the query right. I ran a compact & repair and it works now...Still not sure what caused the error which concerns me.

  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
    The beginnings of corruption. I would *import* everything into a fresh new db and see if the problem follows. http://www.btabdevelopment.com/ts/impnew

  5. #5
    jgelpi16 is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    Ok, will do. Thanks.

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

Similar Threads

  1. docmd.openform Invalid database object reference
    By snoopy2003 in forum Programming
    Replies: 5
    Last Post: 03-15-2011, 09:11 AM
  2. Replies: 0
    Last Post: 06-14-2010, 07:19 AM
  3. Runtime Error '3027': Database or object is read only
    By 4x4Masters in forum Programming
    Replies: 4
    Last Post: 06-08-2010, 08:02 PM
  4. OLE object not written to database
    By Jean-Louis Leroy in forum Forms
    Replies: 0
    Last Post: 06-08-2010, 02:08 AM
  5. Replies: 1
    Last Post: 03-24-2010, 08:48 AM

Tags for this Thread

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