Relinking database with code

  • Thread starter Thread starter Mike San Filippo
  • Start date Start date
M

Mike San Filippo

How can I write a module to relink a database with code?

I have a database that I just want to click on a button
and it will relink to something like c:\db\db_be.mdb

And you click another button to relink it to live data. or
even just doubleclick on a module or macro. either or.

Also, sometimes when I write databases I integrate other
db's also. I want to be able to relink multiple databases
w/ code too.

Any ideas?

Thanks,
Mike
 
Loop through the TableDefs.
If it's not a system table (starts with MSys) or a temporary/deleted table
(starts with ~), and it has something in its Connect property, then it is a
linked table.

Set the Connect property to the correct string, and RefreshLink.

For multiple back-ends, you will need some way to indicate which file to
attach to, e.g. your own table of what links to which.
 
Back
Top