C
CrisW
Hello, I have the following bit of code that partially works. It will relink
the first 6 tables (I have 10 in total), but then it errors out with "Invalid
Operation". Any thoughts?
Private Sub Command0_Click()
Dim db As dao.Database
Dim tdf As dao.TableDef
Dim strConnect As String
strConnect = CurrentProject.Path
strConnect = ";DATABASE=" & strConnect & "\be\be\funmaster_be.mdb"
Set db = CurrentDb
For Each tdf In db.TableDefs
tdf.Connect = strConnect
tdf.RefreshLink
Next tdf
Set tdf = Nothing
Set dbs = Nothing
End Sub
the first 6 tables (I have 10 in total), but then it errors out with "Invalid
Operation". Any thoughts?
Private Sub Command0_Click()
Dim db As dao.Database
Dim tdf As dao.TableDef
Dim strConnect As String
strConnect = CurrentProject.Path
strConnect = ";DATABASE=" & strConnect & "\be\be\funmaster_be.mdb"
Set db = CurrentDb
For Each tdf In db.TableDefs
tdf.Connect = strConnect
tdf.RefreshLink
Next tdf
Set tdf = Nothing
Set dbs = Nothing
End Sub