|
' =========================================================
' TestRefreshLink 函数: 用于测试链接表是否正常链接, 并返回
' 测试结果
' =========================================================
Public Function TestRefreshLink(ByVal strName As String, ByRef strErr As String) As Boolean
Dim dbs As Database
Dim tdf As TableDef
On Error GoTo ErrorHandler
TestRefreshLink = False
Set dbs = CurrentDb
Set tdf = dbs.TableDefs(strName)
tdf.RefreshLink
TestRefreshLink = True
strErr = "OK!"
Exit Function
ErrorHandler:
strErr = "ERROR! " & Err.Number & ". " & Err.Description
End Function
|
|