var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Dynamically Relinking Linked Tables
My problem was that I wanted to dynamically relink all the linked tables if the path of my back end changes.
I am using catalog Catalog colloection of ADOX and was modifying the linked datasource property to the new db path.
The function work good on all the machines which have full microsoft office installed. It doesnot work on machines which have only the microsoft's Access runtime files.
Any idea what should I do? or does anyone has encountered similar problem?
I pass the path and filename of the tx.mdb from another function to this fuction:
counttables = dbs.TableDefs.count
Main = left(FileName, InStr(FileName, "Tx") - 1) & "Main.mdb"
Common = left(FileName, InStr(FileName, "Tx") - 1) & "Common.mdb"
For intCount = 0 To counttables - 1
calcPct = Int(intCount / counttables * 100)
Forms![Message]![Message].Caption = "Opening File (" & calcPct & "%): " & Chr(13) & Chr(10) & Chr(13) & Chr(10) & FileName
Set tdf = dbs.TableDefs(intCount)
' If the table has a connect string, it's a linked table.
Check = tdf.Connect
If Len(Check) > 0 Then
tdfName = tdf.Name
If InStr(Check, "Main") > 0 Then
LinkFileName = Main
ElseIf InStr(Check, "Common") > 0 Then
LinkFileName = Common
LinkFileName = FileName
LinkFileName = left(Check, InStr(Check, "DATABASE") + 8) & LinkFileName
If tdf.Connect <> LinkFileName Then
tdf.Connect = LinkFileName
Err = 0
tdf.RefreshLink ' Relink the table.
If Err <> 0 Then
Relink = False
Thanks I'll try and will post the results..