halem2
Registered User.
- Local time
- Today, 03:48
- Joined
- Nov 8, 2006
- Messages
- 180
HI All:
running Access 2000.
I found this code on http://my.advisor.com/articles.nsf/aid/12911#bio called "Relink Access Tables" but I'm getting an error on the line in RED. This is the actual code:
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim strPath As String
strPath = "<SomePathToBackEndDatabase>"
Set db = CurrentDb()
For Each tdf In db.TableDefs
If (tdf.Attributes AND dbAttachedTable) = _
dbAttachedTable Then
tdf.Connect = ";DATABASE=" & strPath
tdf.RefreshLink
End If
Next
I typed it in and RefreshLink shows in the dropdown in VBA. ANy ideas what it could be? I want to include this code as part of a form on a cmdButton.
thanks
running Access 2000.
I found this code on http://my.advisor.com/articles.nsf/aid/12911#bio called "Relink Access Tables" but I'm getting an error on the line in RED. This is the actual code:
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim strPath As String
strPath = "<SomePathToBackEndDatabase>"
Set db = CurrentDb()
For Each tdf In db.TableDefs
If (tdf.Attributes AND dbAttachedTable) = _
dbAttachedTable Then
tdf.Connect = ";DATABASE=" & strPath
tdf.RefreshLink
End If
Next
I typed it in and RefreshLink shows in the dropdown in VBA. ANy ideas what it could be? I want to include this code as part of a form on a cmdButton.
thanks