Results 1 to 5 of 5

Invalid database object reference.

  1. #1
    jgelpi16 is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    540

    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
    10,931
    Are you sure you have the name of the query right?
    (RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 Pro - acXP, ac07, ac10, ac13
    If your issue is resolved...go ahead and use the Thread Tools at the top of the thread and mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  3. #3
    jgelpi16 is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    540
    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
    10,931
    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
    (RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 Pro - acXP, ac07, ac10, ac13
    If your issue is resolved...go ahead and use the Thread Tools at the top of the thread and mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  5. #5
    jgelpi16 is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    540
    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, 08:11 AM
  2. Replies: 0
    Last Post: 06-14-2010, 06:19 AM
  3. Runtime Error '3027': Database or object is read only
    By 4x4Masters in forum Programming
    Replies: 4
    Last Post: 06-08-2010, 07:02 PM
  4. OLE object not written to database
    By Jean-Louis Leroy in forum Forms
    Replies: 0
    Last Post: 06-08-2010, 01:08 AM
  5. Replies: 1
    Last Post: 03-24-2010, 07: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
  •  
Tech Forums: Microsoft Office Forums