CurrentProject.IsTrusted property (Access)

Gets whether macros and Visual Basic for Applications (VBA) code have been enabled in the current project. Read-only Boolean.



expression A variable that represents a CurrentProject object.


The following example shows how to use the IsTrusted property in a macro to determine whether the database has been opened with trust enabled. If trust has been enabled, the Visual Basic for Applications (VBA) subroutine Init is called. Otherwise, the user is notified that the database has been opened in disabled mode.

    If [currentproject].[istrusted] Then
            Function Name =Init()

            Message The application is opened in disabled mode. Please enable the application for full functionality.
            Beep Yes
            Type None
            Title Disabled Mode Check

    End If

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.