If you used a setting to specify what happens when you open a Microsoft Access database, you can bypass those settings to regain full access to your database. For example, you can set options for a Current Database from the Access Options dialog box, or by creating an AutoExec macro, or by an Open event procedure. If your database has a startup option setting, this article describes how to bypass it.
To bypass all startup options, complete the following step:
-
Hold down the SHIFT key while opening your database.
Depending on the macro security settings for your database, you might see one or more security messages on startup.
Note: You must continue to hold down the SHIFT key while you close all the security messages, or the startup options does not be bypassed.
When you open a database while holding down the SHIFT key, many of the options that are set on the Current Database page of the Access Options dialog box are bypassed. To change these options, do the following:
-
Click the File tab, and then click Options.
The Access Options box opens.
-
Click Current Database, and change the settings for the current database.
Note: You may need to close and reopen the database for the changes to be effective.
The following table lists each setting on the Current Database page and how they behave when you open the database while holding down the SHIFT key.
Option Group |
Setting |
Behavior when startup options are bypassed |
Application Options |
Application Title |
The custom application title is not displayed. |
Application Icon |
The custom application icon is not displayed. |
|
Display Form |
The designated form is not displayed, and none of the form's event procedures are run. |
|
Web Display Form |
Is available only when a designated Web form is present. When available, the designated Web form is not displayed, and none of the form's event procedures are run. |
|
Navigation |
Display Navigation Pane |
Even if this option is not selected, the Navigation Pane is displayed. |
Ribbon and toolbar options |
Ribbon Name |
The designated custom Ribbon is not displayed. |
Allow Full Menus |
All default Ribbon tabs are displayed regardless of the setting. |
|
Allow Default Shortcut Menus |
All default shortcut menus are displayed regardless of the setting. |
For more information on how to set options for the Current Database, see the article Set user options for a current database from a centralized location.
If you add an Access macro named AutoExec to a database, the macro usually runs every time that you open the database. When you bypass the startup options, the AutoExec macro does not run.
When your database has multiple users, you can prevent users from bypassing startup options. Disable the Bypass (SHIFT) key by using Visual Basic for Applications (VBA) code to set the AllowBypassKey property to False.
The AllowBypassKey property uses the following settings.
Setting |
Description |
True |
Enable the SHIFT key to allow the user to bypass the startup properties and the AutoExec macro. |
False |
Disable the SHIFT key to prevent the user from bypassing the startup properties and the AutoExec macro. |
You can set this property by using a macro or VBA code.
To set the AllowBypassKey property by using a macro, you must create the property in the following way:
-
In a Microsoft Access database (.mdb or .accdb), you can add the property by using the CreateProperty method and then appending it to the Properties collection of the Database object.
-
In a Microsoft Access project (.adp), you can add the property to the AccessObjectProperties collection of the CurrentProject object by using the Add method.
The AllowBypassKey property's setting doesn't take effect until the next time that the application database opens.