Dim tdf As TableDef
RefreshLinks = False
For Each tdf In CurrentDb.TableDefs
If tdf.Connect <> "" Then
tdf.Connect = ";DATABASE=" & strFileName & ""
tdf.RefreshLink
End If
Next tdf
RefreshLinks = True
Exit Function
Exit_ERR:
Select Case Err
Case 3011
MsgBox "指定数据库中没有所需数据.....", vbExclamation
Case 3031
MsgBox "指定数据库需要输入密码.....", vbExclamation
End Select
Exit Function
End Function