How to enforce or disable the startup options in an Access database project (826765)



The information in this article applies to:

  • Microsoft Office Access 2003
  • Microsoft Access 2002
  • Microsoft Access 2000

This article applies only to a Microsoft Access project (.adp).

Moderate: Requires basic macro, coding, and interoperability skills.

SUMMARY

This article describes how to disable the functionality of the SHIFT key that permits you to bypass the startup options. This article also describes how to enforce the startup options in a Microsoft Access database project.

MORE INFORMATION

The startup options that are defined for an Access file determine how the file looks and how the file behaves when you open the file. You can set the startup options by using the startup user interface or by using the AutoExec macro.

For more information about the startup options, click Microsoft Office Access Help on the Help menu, type about startup options in the Search for box in the Assistance pane, and then click Start searching to view the topic.

To bypass the startup options that are set for the Access database project, hold down the SHIFT key while you open the Access database project.

Alternatively, to enforce the startup options that are set for the Access database project, disable the functionality of the SHIFT key that permits you to bypass the startup options. To do this, set the AllowBypassKey property to False.

To set the AllowBypassKey property to False, follow these steps:
  1. Start Access.
  2. Open an Access database project.
  3. In the Database window, point to Macro on the Tools menu, and then click Visual Basic Editor.
  4. In the Visual Basic Editor, click Immediate Window on the View menu.
  5. Type the following code or paste the following code in the Immediate window, and then press ENTER.
    CurrentProject.Properties.Add "AllowBypassKey", False
    
  6. Close the Visual Basic Editor, and then close the Access database project.
  7. Open the Access database project. Try to bypass the startup options that are set for the Access database project by holding down the SHIFT key while you open the Access database project.

    The functionality of the SHIFT key that permits you to bypass the startup option is disabled. Although you hold down the SHIFT key to bypass the startup options, the startup options are executed. You cannot bypass the startup options.

REFERENCES

For more information about the AllowBypassKey property, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type AllowBypassKey property in the Search for box in the Assistance pane, and then click Start searching to view the topic.

Modification Type:MinorLast Reviewed:6/3/2004
Keywords:kbConfig kbProperties kbADP kbhowto KB826765 kbAudDeveloper