By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,225 Members | 2,172 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,225 IT Pros & Developers. It's quick & easy.

Checking Linked Access objects via VBA

P: n/a
I have two .mdbs,
MyTestApp.mdb- front end for forms and
MyTestData.mdb-backend for tables.

While the front end is copied to the user's desktop via a batch file,
the front end is linked to the backend currently. I did that
manually. The catch here is that the backend .mdb is used by more
than one application.

I am looking for a way via VBA in my front end app at startup (and the
other ones) to:
1. Interrogate to see if tblA, tblB, & tblC are linked to the
backend .mdb.
2. If the table being checked exists, great. If any of the tables are
missing, I would need to execute a link to the missing table in a VBA

Does someone have a code sample of how this is done? I tried invoking
a table object, but I am experiencing some errors trying to set this
up. (I'm not sure of a generic way to check all of the tables in an
app regardless of their table names or how many tables are there.)

Some other shared objects that need to go on the backend .mdb file are
Reports, Macros, and Queries and a few modules. On this side of
things, do you link to these objects to use them the same way you link
to tables, or is is a bad idea to share objects other than tables?

Thanks for your is appreciated....

Jul 18 '07 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Does someone have a code sample of how this is done?
You can obtain the Developer Solutions example database from It has not, AFAIK, been
updated since Access 2000 but works with all subsequent versions of Access,
though some of the solutions may differ in detail in Access 2007.

Select "Use multiple databases" as Category of Examples, then choose "Link
tables at startup" (the only example in the category).

When I use similar VBA, I use the code at to allow the user to search and
select files in a comfortable, familiar way (the Windows Common Dialog that
they are used to using in other applications).

Larry Linson
Microsoft Access MVP
Jul 18 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.