Same Query in Multiple Databases

S

stickandrock

I have 20 sites that each have their own Access DB. Each site has the
identical data structure of tables. I have 20 linked databases to these
remote ones at my central office. I would like to run the same query on each
of these db's without having to define the same query 20 times. What should
my method to open each of linked db's run my query and close the db and then
move on to the next one.

Thanks,
 
G

Granny Spitz via AccessMonster.com

stickandrock said:
What should
my method to open each of linked db's run my query and close the db and then
move on to the next one.

Create one query and a VBA procedure. In the procedure loop through each
database path and change the SQL statement of the query to match that
database path so the query executes on the table in *that* database.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top