IsBroken Property

Microsoft Access Visual Basic

object points to a valid reference in the Windows Registry. Read-only Boolean.

expression.IsBroken

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

The IsBroken property is available only by using Visual Basic and is read-only.

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.

Example

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