Export (0) Print
Expand All

Reference.IsBroken Property (Access)

The IsBroken property returns a Boolean value indicating whether a Reference object points to a valid reference in the Windows Registry. Read-only Boolean.

expression .IsBroken

expression A variable that represents a Reference object.

The default value of the IsBroken property is False. The IsBroken property returns True only if the Reference object no longer points to a valid reference in the Registry.

By evaluating the IsBroken property, you can determine whether or not the file associated with a particular Reference object has been moved to a different directory or deleted.

If the IsBroken property is True, Microsoft Access generates an error when you try to read the Name or FullPath properties.

The following example prints the value of the FullPath, GUID, IsBroken, Major, and Minor properties for each Reference object in the References collection:

Sub ReferenceProperties() 
 Dim ref As Reference 
 
 ' Enumerate through References collection. 
 For Each ref In References 
 ' Check IsBroken property. 
 If ref.IsBroken = False Then 
 Debug.Print "Name: ", ref.Name 
 Debug.Print "FullPath: ", ref.FullPath 
 Debug.Print "Version: ", ref.Major & "." & ref.Minor 
 Else 
 Debug.Print "GUIDs of broken references:" 
 Debug.Print ref.GUID 
 EndIf 
 Next ref 
End Sub
Show:
© 2014 Microsoft