I link tables in one .mdb file from another .mdb file. With the "Linked
Table Manager" I can see that the path to the linked .mdb file is hardcoded.
So if I move the file, the links are broken.
Is there a way to link without hardcoded paths? I have both .mdb always in
the same directory.
If not, how do I change the paths of linked tables programmaticly?
- Open linked table structure.
- Change path.
- Save linked table structure.
For Each objTable In .Tables
If UCase(objTable.Type) = "LINK" Then
Rem (6) = Jet OLEDB:Link Datasource.
objTable.Properties.Item(6) = gstrDatabaseDirectory &
gstrDatabaseFile
End If
Next
.Tables.Refresh
I just hope that the two constants "LINK" and "6" never change in Access...
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.