AccessObject.IsLoaded Property (Access)

You can use the IsLoaded property to determine if an AccessObject is currently loaded. Read-only Boolean.

expression .IsLoaded

expression A variable that represents an AccessObject object.

The IsLoaded property uses the following settings.


Visual Basic




The specified AccessObject is loaded.



The specified AccessObject is not loaded.

The following example shows how to prevent a user form opening a particular form directly from the Navigation Pane.

Sample code provided by: Access 2010 Programmers Reference book cover The Microsoft Access 2010 Programmer’s Reference | About the Contributors

'Don't let this form be opened from the Navigator
If Not CurrentProject.AllForms(cFormUsage).IsLoaded Then
    MsgBox "This form cannot be opened from the Navigation Pane.", _
        vbInformation + vbOKOnly, "Invalid form usage"
    Cancel = True
    Exit Sub
End If

Wrox Press is driven by the Programmer to Programmer philosophy. Wrox books are written by programmers for programmers, and the Wrox brand means authoritative solutions to real-world programming problems.