Application.BrokenReference 属性 (Access)
返回一个 boolean 类型的值 ,表明当前数据库是否包含任何对数据库或类型库的损坏的引用。 如此 如果有任何损坏的引用。 此为只读属性。
语法
表达式。BrokenReference
expression:表示 Application 对象的变量。
备注
若要测试特定引用的有效性,请使用 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
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。