ник: Дядя Федор
Самое простое
Public Sub AccessLink()
Dim dbs As Database
Dim tdf As TableDef
Dim sBase$
Set dbs = CurrentDb
sBase = "E:\Server\SRV.mdb"
MsgBox "Линкую " & sBase & "-" & dbs.TableDefs.Count & " таблиц"
For Each tdf In dbs.TableDefs
rem Debug.Print "" & tdf.Connect
If Len(tdf.Connect) > 0 Then
tdf.Connect = ";DATABASE=" & sBase
tdf.RefreshLink
End If
Next tdf
MsgBox "OK" & vbCr & sBase, vbOKOnly + vbInformation, ""
End Sub
|
А вообще, см. помощь на Connect,RefreshLink