Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    MadTom's Avatar
    MadTom is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jun 2018
    Location
    CT and VT
    Posts
    206

    database engine could not find the object

    I get this error when I try to copy a table?


    The Microsoft Access database engine could not find the object <table name>. Make sure the object exists and that you spell its name and the path name correctly. If '<table name>' is not a local object, check your network connection or contact the server administrator

    Maybe a setting? everything is closed but DB. Not on a server, accdb file. Access 365
    Thanks!

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,975
    Sounds like you have just typed the name incorrectly ...or it has a space or special character in the table name.
    If it has a space or special character, enclose it in [].

    If none of that is true, please post the code you used
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    MadTom's Avatar
    MadTom is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jun 2018
    Location
    CT and VT
    Posts
    206
    What I'm doing is copying a table, I go to paste table, it has copyofxxxtable. I click ok and then I get the error. Not in VBA. Just in Nav pane.

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,975
    In that case, either you have errors in the MSysObjects system table or you need to run an Office repair.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #5
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    If you have some sort of corruption, one way to fix it is to create a brand new, blank database.
    Then import all of your objects from the old database into the new one.
    This will ensure that the new copy has all the required system tables without any errors/corruption.

  6. #6
    MadTom's Avatar
    MadTom is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jun 2018
    Location
    CT and VT
    Posts
    206
    Thanks JoeM, I had to do what you suggested. I've been working with this problem for awhile, many backups with the same problem, didn't find it till I wanted to copy or rename a table in Nav Pane.
    Thanks for your help!

  7. #7
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You are welcome.

  8. #8
    MadTom's Avatar
    MadTom is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jun 2018
    Location
    CT and VT
    Posts
    206
    I have a new DB copy from the old one. I find I get the same problem when I run this code. This form is a utility only used to change table to a backup or startup table.
    I don't get any errors when this form runs and all seems to work, just the corruption in Sys files.
    Thanks, Mad-Tom

    Code:
    DoCmd.CopyObject , PartsName_global & Now(), acTable, PartsName_global  'make a backup of PartsName_global    
        DoCmd.CopyObject , "tblPartsBackup" & Now(), acTable, "tblParts"  'make a backup of tblParts to tblPartsBackup
        DoCmd.DeleteObject acTable, "tblParts"
        DoCmd.Rename "tblParts", acTable, PartsName_global


  9. #9
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,975
    You can't rename tblParts as you had just deleted it with the previous line of code.
    So Access correctly states it cannot find the object tblParts...as it no longer exists
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  10. #10
    MadTom's Avatar
    MadTom is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jun 2018
    Location
    CT and VT
    Posts
    206
    Did I have this wrong?
    The Newname table was deleted first then a rename PartsName_global[ to tlbParts.
    DoCmd.Rename "Newname", acTable, "OLDNAME*"

    Code:
    DoCmd.Rename "tblParts", acTable, PartsName_global
    Thanks!

  11. #11
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Look at these two lines of code that you have:
    Code:
        DoCmd.DeleteObject acTable, "tblParts"
        DoCmd.Rename "tblParts", acTable, PartsName_global
    The first line is deleting the table named "tblParts".
    The second line is then trying to rename the table named "tblParts".
    But you cannot do that, as you just deleted it in the previous line! It no longer exists!

  12. #12
    MadTom's Avatar
    MadTom is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jun 2018
    Location
    CT and VT
    Posts
    206
    Ok I see I don't need to delete table, Rename is all I need. I'm still working on errors on new DB.
    I get Error 3270 when I use this code. Didn't have this with old DB with same forms.
    Could this be connected to Reference Library setting?

    Thanks!
    Code:
    CurrentDb.Properties("AllowFullMenus") = False        CurrentDb.Properties("AllowShortcutMenus") = False
            CurrentDb.Properties("AllowBuiltinToolbars") = False

  13. #13
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,798
    Some db properties cannot be set until they are added/created in a particular db. I'm not sure if those are in that group. You probably have code in the other db that creates them first but you didn't do that in the new one. If your error message doesn't apply, ignore my post. It's just that you didn't state what the error text is and there are thousands of error numbers and I doubt anyone knows them all. It would be appreciated if you provided the info because I'm too lazy to look it up for everyone every time.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  14. #14
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,975
    Error 3270 is indeed Property not found as Micron rightly surmised.
    I only know that from working with code to add new properties. But you really need to provide that information yourself.

    Anyway, those are three standard properties that can easily be set from Access options.
    Suggest you do so, then run the code again. If you still get the error, you have mis-spelled one of them.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  15. #15
    MadTom's Avatar
    MadTom is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jun 2018
    Location
    CT and VT
    Posts
    206
    How do I add Property that I need? I do not see them in Access options, maybe missed them?
    I did new DB and they are not there?
    I used this code to list them.

    Code:
    Public Sub ListDBProps()    Dim db As Database
        Dim prp As Property
    
    
        Set db = CurrentDb
    
    
        For Each prp In db.Properties
            MsgBox prp.Name
    
        Next prp

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 8
    Last Post: 05-16-2018, 06:04 PM
  2. Replies: 4
    Last Post: 05-22-2017, 03:39 PM
  3. Replies: 2
    Last Post: 08-09-2016, 01:22 PM
  4. Replies: 1
    Last Post: 04-24-2014, 03:49 AM
  5. Replies: 1
    Last Post: 09-03-2011, 07:01 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