Same Query in Multiple Databases

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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,
 
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.
 
Back
Top