CurrentProject.IsTrusted Property (Access)
Gets whether or not macros and Visual Basic for Applications (VBA) code have been enabled in the current project. Read-only Boolean.
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 use is notified that the database has been opened in disabled mode.
If [currentproject].[istrusted] Then RunCode Function Name =Init() Else MessageBox 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