Cannot Find the Input Table

I’m getting an error in MSQuery. I’ve had nothing but trouble with MSQuery since I changed employment. The current error I’m getting is:

The Microsoft Office Access database engine cannot find the input table or query ‘mdb.tblDocuments’. Make sure it exists and that its name is spelled correctly.

Aside: I just had to type that error message because error text in a message box isn’t copy-able.

The SQL statement MSQuery generates is:

SELECT tblDocuments.DocID FROM ‘C:AIMCDConfig’.mdb.tblDocuments tblDocuments

It seemed to me that it chose odd location for the quote marks, particularly since there are no spaces in the path. I tried deleting the quote marks, I tried putting the quote mark after mdb, and I tried putting the quote mark after tblDocuments. I also tried messing with that period between mdb and tblDocuments. Deleting them produced the same error. Moving them created two errors in succession, namely:

SQL Query can’t be represented graphically. Continue anyway?

Could not add the table “C:AIMCDConfig.mdbtblDocuments”.

What finally worked is:

SELECT tblDocuments.DocID FROM “C:AIMCDConfig.mdb”.tblDocuments tblDocuments

I still can’t get rid of the “can’t be represented graphically” message, but it works. Once I get the query in Excel, I manually change the CommandText property to:

SELECT tblDocuments.DocID FROM tblDocuments

and it works like a peach.

Posted in Uncategorized

15 thoughts on “Cannot Find the Input Table

  1. As for the error message, there’s a utility named SnagIt that can capture most text on screen. And if it’s too expensive, you could always use Print Screen, paste into the Microsoft Document Imaging applet and run the image through OCR.

  2. As you know I’m no Wordsworth, but is it spelled or spelt?

    Strange that MSQ should be causing problems for you on this PC – any ideas why? – Anyone?

  3. Ross, according to the world wide web, either is correct, with “ed” being more common in the US. Although I don’t think you can say “I was tired, so he spelt me for 15 minutes.” And there’s no such thing as spelled bread.

  4. I have found with Access in the past that you have to use the “” rather than the ” with Excel as you are referring to a database extension .mdb the “” would be required.

  5. As for getting the text from a message box, have you tried the Windows-standard way of just pressing Ctrl-C? It works most of the time.

  6. I am having exact same problem.
    I am not sure if it has to do with the database being located on the network.
    If I copy the database to “mt Documents” folder and re-link the pivot table to it it works flawlessly, but if i link to the database ( the same one) located anywhere except my documents it will give me the same error message as above.

    any help will be appreciated.


  7. Anyone find a cause for this? Cannot find any other documentation other than this page.

  8. i fixed my problem by “detect and repair” function on excel help menu.
    good luck

  9. I was getting a similar message in Excel while using Import External Data > New Database Query and also solved it using DETECT AND REPAIR on the Help Menu.

    Thanks Kolya!

  10. Just another vote of thanks to Kolya. I had this problem yesterday and “Detect and Repair” has taken care of it. Thanks!

  11. You guys rock, that totally fixed it for me as well!! “Detect and Repair” under Excel – Help!! Thanks!!!!

  12. Had right now the same problem. “Detect and repair” does the job. Wasted quite some time looking for the answer on …

Posting code? Use <pre> tags for VBA and <code> tags for inline.

Leave a Reply

Your email address will not be published.