turtlemaster
Programmer
I have a split 2000 database and want to refresh the table links through code. I researched how to do this on the web and came up with this code.
Dim i As Integer
For i = 0 To CurrentDb.TableDefs.count - 1
If Not CurrentDb.TableDefs(i).Connect = "" Then
CurrentDb.TableDefs(i).Connect = "MS Access;DATABASE=" & txtPath & ";PWD=" & txtPassword
CurrentDb.TableDefs(i).RefreshLink
End If
Next i
For some reason it won't update the tabledef.connect property. I try to set it to something else and it won't change. No errors are generated but nothing happens. Any suggestions. (don't want to use linked table manager)
Thanks,
Nick
Dim i As Integer
For i = 0 To CurrentDb.TableDefs.count - 1
If Not CurrentDb.TableDefs(i).Connect = "" Then
CurrentDb.TableDefs(i).Connect = "MS Access;DATABASE=" & txtPath & ";PWD=" & txtPassword
CurrentDb.TableDefs(i).RefreshLink
End If
Next i
For some reason it won't update the tabledef.connect property. I try to set it to something else and it won't change. No errors are generated but nothing happens. Any suggestions. (don't want to use linked table manager)
Thanks,
Nick