Access (的 Application.BrokenReference 屬性)

會傳回 Boolean 指出目前的資料庫是否有任何中斷的參照至資料庫或型別程式庫。 True 是表示 如果有任何中斷的參照。 唯讀。

語法

運算式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 支援與意見反應