Setting Startup Options

After you’ve created a startup form for your application, and menu bars and toolbars to help users navigate, you’re ready to tell Microsoft Access to use them when the application starts.

To control how your application looks and behaves when users start it, use the Startup command on the Tools menu. For example, you can use the options in the Startup dialog box to open the application’s startup form, hide the Database window, and display a custom menu bar each time the application starts. You can also prevent changes to menus and toolbars, and prevent the use of special keystrokes used to show the Database window or the Debug window, or to pause execution (F11 or ALT+F1, CTRL+G, and CTRL+F11).

Û To set startup options for an application

  1. On the Tools menu, click Startup.
  2. In the Display Form box, click the form you want Microsoft Access to open each time you open the database.
  3. Set other startup options, and then click OK.

    The next time you open the database, Microsoft Access uses your startup settings.

Note   You can also change startup settings while your application is running by setting properties of the current database. For information, search the Help index for “startup options.”

To prevent users from bypassing the settings in the Startup dialog box by holding down the SHIFT key as your application opens, set the AllowBypassKey property to False in Visual Basic. Alternatively, you can establish user-level security and then make sure only members of the Admins group have Administer permission for a database.

See Also   For more information on these security options, search the Help index for “AllowBypassKey property” or “user-level security.”

Example
Setting How an Application Starts

When Northwind sales representatives start the day, the first thing they do is enter new orders in the database. You start the Orders application with the Orders form open for data entry. In addition, you hide the Database window because you don’t want the sales representatives to see the tables, queries, macros, and modules that make up your application.

On the Tools menu, click Startup, and then set options as shown in the following illustration.

Creating a Shortcut to Start Your Application

To make your application easier to start, you can create a Windows shortcut icon that opens Microsoft Access and starts your application at the same time. This way, users of your application don’t have to start Microsoft Access first.

When you create a shortcut, you can also specify additional startup options for Microsoft Access and your application. You do this by adding command-line options to the Windows shortcut you create. For example, you can use the /Excl option to specify that your application’s database should be opened for exclusive access.

Û To create a shortcut to start your application

  1. Open the folder where Microsoft Access is installed.
  2. Right-click the MSAccess program icon, and then click Create Shortcut.
  3. Right-click the shortcut icon you just created, click Properties, and then click the Shortcut tab.
  4. In the Target box, click to the right of the Microsoft Access startup command and then type the full path to your application and any other command-line options you want.

    For example, the following command line starts Microsoft Access and opens the Orders database for exclusive access:

    "C:\Program Files\Microsoft Office\Office\MSAccess.exe" "C:\Program Files å\Microsoft Office\Office\Samples\Orders.mdb" /Excl

After you create a shortcut, you can rename it, put it on your desktop or in a folder, or add it to the Start menu.

See Also   For information on other command-line options, search the Help index for “command line.” For more information on shortcuts, search the Windows 95 Help index for “shortcuts.”

Tip When you use a shortcut to open Microsoft Access and your application at the same time, you can also provide a bitmap to display in place of the standard Microsoft Access splash screen. To provide a custom splash screen, create a bitmap (.bmp) file with the same name as your application and place it in the same folder as your application’s database. For example, if you want the shortcut above to display a custom splash screen, place a bitmap file called Orders in the same folder as the Orders database.