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:
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:
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:
and it works like a peach.