this my function which works for me' Function to Refresh links to the supplied database. Return True if successful.
Dim dbs As Database
Dim tdf As TableDef
' Loop through all tables in the database.
Set dbs = CurrentDb
For Each tdf In dbs.TableDefs
' If the table has a connect string, it's a linked table.
If Len(tdf.Connect) > 0 Then
tdf.Connect = ";DATABASE=" & strFileName
Err = 0
On Error Resume Next
tdf.RefreshLink ' Relink the table. _
If Error occurs HERE, on this line, -produces- <> 0
If Err <> 0 Then
RefreshLinks = False
Exit Function
End If
End If
Next tdf
RefreshLinks = True ' Relinking complete.
Note: strFileName = root to required db ie C:\accessfolder\access.mdb
hope ok
[This message has been edited by RonB (edited 02-23-2002).]