Change linked table connection string with code

Chisamba

Registered User.
Local time
Today, 22:52
Joined
Jul 10, 2006
Messages
12
I would like to use code to change the connection string for linked tables in my front end database. I have tried using the connection property of the TableDefs collection, this seems to work while I step through the code but does not change the existing connection property. Any suggestions?
 
When changing the connection string of a linked table, you must then refresh the link. For example:
Code:
td.Connect = "MS Access;Database=C:\MyBackEnd.mdb;"
td.RefreshLink
The RefreshLink command commits the change to the connection string.
 
Thanks a lot.
 

Users who are viewing this thread

Back
Top Bottom