error 3055 (1 Viewer)

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
 

halem2

Registered User.
Local time
Today, 03:48
Joined
Nov 8, 2006
Messages
180
I guess I solved my own problem. I made this change and it works (slow but it works)

I commented out the strPath declaration above and it's reference to it below and just typed in the path.

Thanks.:D

tdf.Connect = ";DATABASE=G:\Vero Inventory\vero Inventory_be.mdb" '& strPath
 

Users who are viewing this thread

Top Bottom