Linking tables from different database

J

Jackie

Hi,

I have 2 database both created in ms access 2002. My
database 2, all the tables are linked to my database 1
tables.

Is there a way that i can automatically update all the
linked tables each time the database 2 is opened? Or is
there a better way that I can update the linked tables?

Help please!!!
 
G

Guest

You use the following code to delete the tables

DoCmd.DeleteObject acTable, "tablename"

delete each linked table and then use the following code
to attach the tables

DoCmd.TransferDatabase acLink, "Microsoft Access", path,
acTable, "tablenamelinking", "linkedtablename"

You can create an opening form that propmpts for the
location of the tables and then goes ahead and reattachs

contact me if you have any questions

Nigel
(e-mail address removed)
 

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