BrokenReference 属性

       

返回一个 Boolean 值,表明当前数据库是否包含任何对数据库或类型库的损坏的引用。如果为 True,则有损坏的引用。只读。

expression.BrokenReference

expression   必需。返回“Applies To”列表中的一个对象的表达式。

说明

若要试用特定引用的有效性,请使用 Reference 对象的 IsBroken 属性。

示例

该示例检查当前数据库中是否有任何已损坏的引用,并向用户报告结果。

' Looping variable.
Dim refLoop As Reference
' Output variable.
Dim strReport As String

' Test whether there are broken references.
If Application.BrokenReference = True Then
    strReport = "The following references are broken:" & vbCr

    ' Test validity of each reference.
    For Each refLoop In Application.References
        If refLoop.IsBroken = True Then
            strReport = strReport & "    " & refLoop.Name & vbCr
        End If
    Next refLoop
Else
    strReport = "All references in the current database are valid."
End If

' Display results.
MsgBox strReport