Freigeben über


Using Startup Options

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

In an environment where a high level of security isn't required, you can use startup options to restrict access to default menus and toolbars, the Database window, and special keys. To perform the following procedure, your solution must have a startup form and a custom menu bar that contains only the commands you want available. This method can be used for both .mdb and .adp files. You can also use startup options in conjunction with other forms of security.

To use startup options to protect your solution

  1. On the Tools menu, click Startup.

  2. Click Advanced to display the rest of the dialog box.

  3. In the Display Form box, click the name of your startup form.

  4. In the Menu Bar box, click the name of your menu bar.

  5. Clear the following check boxes: Allow Full Menus, Allow Default Shortcut Menus, Display Database Window, Allow Built-in Toolbars, Allow Toolbar/Menu Changes, and Use Access Special Keys.

  6. In Visual Basic for Applications (VBA), set the AllowBypassKey property to False. This prevents users from using the SHIFT key to bypass the settings in the Startup dialog box. For information about how to set the AllowBypassKey property, search the Microsoft Access Visual Basic Reference Help index for "AllowBypassKey property." You can also set the startup options and properties used in this procedure (as well as other startup options and properties) from VBA code. For information about how to do this, search the Microsoft Access Visual Basic Reference Help index for "Startup properties."

****Note   ****A user can bypass this method of security by setting the database's AllowBypassKey property back to True, but that user would need to understand how to create the appropriate line of VBA code to do so.