请教一下,如何采用以下代码,以达到刷新链接表的功能。
Dim db As Database
Dim tbl As TableDef
Dim a As String
Dim b As String
Set db = CurrentDb
For Each tbl In db.TableDefs
If tbl.Attributes = 536870912 Then
tbl.Connect = "DSN=gnts;UID=" & a & "WD=" & b & ";WSID=;DATABASE=" & d & ";Network=DBMSSOCN"
tbl.Attributes = dbAttachSavePWD
tbl.RefreshLink
End If
Next