Function relink()
Dim db As Database
Dim tbl As TableDef
Dim a As String
Dim b As String
Dim d As String
Set db = CurrentDb
For Each tbl In db.TableDefs
If tbl.Attributes = 536870912 Then
tbl.Connect = "FILEDSN=d:\demo\steel.dsn;UID=" & a & "WD=" & b & ";WSID=;DATABASE=" & d & ";Network=DBMSSOCN"
'
tbl.Attributes = dbAttachSavePWD
tbl.RefreshLink
End If
Next