0

I am converting an old Access 2003 database to 2007. It has a query linking to a SQL database. How do I look at the link, e.g., whether it using a DSN, etc.?

The query has the globe to the left of it indicating it is linked. When I try to Open it, it says "ODBC - connection to '(a database name)' failed."

I have searched and seen many posts on Access tables linking to another database, but none of a query linking to another database.

  • Check out Control Panel -> Setup data sources – Sathyajith Bhat May 21 '11 at 5:18
1

You can find the connect string of a table by typing this in the Immediate Windows in the VBE:

  ?CurrentDB.TableDefs("TableToCheck").Connect

That should get you started...

  • I need to see the connect information for a Query, not a Table. – Lars May 23 '11 at 18:08
  • Thanks. I just change TableDefs to QueryDefs and got the connection information I need. – Lars May 25 '11 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.