Setting Startup Options

You can start Access and open a database in a variety of ways. Here are the most common ways:

  • Click Start, point to All Programs, and click Microsoft Access.

  • Double-click a shortcut to MSACCESS.

  • Double-click a shortcut to a database file.

  • Double-click a database file name in a folder.

With the first two methods, Access starts, displaying a blank window from which a new database can be created or an existing one opened. With the last two methods, Access starts, and then it opens the specified database.

Tip

When you start a program by clicking a command on the Start button’s All Programs submenu, you are in fact clicking a shortcut. The entire Start menu is a hierarchical arrangement of shortcuts.

If your database will be used by people with little or no experience with Access, you might want to control which features are available when a database opens. There are several ways to do this. If you want users to be able to open only one database, you can add one or more options to the shortcut used to start Access. These options can open a specific database, run macros, and perform other tasks. A more common way to control the user’s environment is to set startup options in each database. You can use startup options to control the menus and toolbars available to the user, the form displayed (such as a splash screen or switchboard), and other features. The startup form can include macros and VBA procedures that run automatically to set other conditions.

Tip

This exercise uses custom toolbars and menus that were created specially for the sample database. For information about how to create this type of item, search for toolbar in Access online Help. Also, the Orders form in this exercise uses several custom macros. You can review these macros by clicking Macros on the Objects bar and then opening orderForm in Design view. The exercise also uses VBA code attached to the splash screen. You can review this code by selecting the Splash form and then clicking the Code button on the Access window’s toolbar.

In this exercise, you will set startup options that tie together a splash screen, a switchboard, and some custom menus to create a version of the GardenCo database that is appropriate for inexperienced users.

USE the GardenCo database in the practice file folder for this topic. This practice file is located in the My DocumentsMicrosoft PressAccess 2003 SBSSwitchbrdStartup folder and can also be accessed by clicking Start/All Programs/Microsoft Press/Access 2003 Step by Step.

OPEN the GardenCo database and acknowledge the safety warning, if necessary.

  1. On the Tools menu, click Startup.

    The Startup dialog box appears.

    Tip
  2. With the insertion point in the Application Title box, type The Garden Company, and press .

    The text you just entered will be displayed in the Access title bar, replacing the usual Microsoft Access title.

  3. Click the Browse button at the end of the Application Icon box, and navigate to the My DocumentsMicrosoft PressAccess 2003 SBSSwitchbrdStartup folder. Click icon_tgc, and then click OK to enter it as the application icon.

    This icon will appear in the left corner of the title bar, followed by The Garden Company.

    Troubleshooting

    The full path to the icon is recorded. As long as you don’t move the icon, you can move the database to another folder on the same computer, and Access will still find the icon. If you plan to move the database to a different computer, you should instead use the icon’s Universal Naming Convention (UNC) path.

  4. Click the down arrow to the right of the Menu Bar box, and then click gcMenuMain.

    This is a menu bar created specifically for this exercise. The alternative, (default), is the standard menu bar.

  5. In the Display Form/Page box, click the down arrow to display the list of forms, and select Splash.

    This database’s splash screen will be displayed each time the database is opened.

  6. Clear the Display Database Window check box, but leave Display Status Bar checked.

    Tip

    For experienced users, the database window is like a home page: it is where everything starts. But having this window available could be confusing for someone whose only job is entering orders, and it could be disastrous if inexperienced people make changes to critical data.

  7. Leave the Shortcut Menu Bar box set to (default).

  8. Clear both the Allow Built-in Toolbars and the Allow Toolbar/Menu Changes check boxes.

    None of the built-in toolbars can be displayed, preventing the user from making changes to custom toolbars and menus.

  9. For the time being, leave Use Access Special Keys selected.

    When this option is selected, several special key combinations are available, including , which toggles the standard menu on.

    Tip
  10. Click OK to close the Startup dialog box.

    Most startup options don’t go into effect until you close and restart the database. The only changes you should see now are the icon and the name in the Access window’s title bar.

  11. Close and reopen the GardenCo database, enabling macros if necessary.

    The startup options go into effect: you see the new title bar, the custom menu bar, and the splash screen.

  12. On the splash screen, click OK.

    Troubleshooting

    If you get an error when you click OK on the splash screen, click the Reset button. The Visual Basic Editor will be displayed. On the Tools menu, click References, scroll down, click Microsoft DAO 3.6 Object Library, and click OK. Then repeat your tests.

    The VBA code attached to the Splash form in the GardenCo database causes the switchboard to be displayed.

  13. On the switchboard, click Forms, and then click Edit/Enter Orders on the second-level switchboard page.

    The Orders form and its associated custom toolbar appear.

    Tip

    If the toolbar appears in the Orders form, you can drag it and dock it below the menu bar.

    Tip
  14. On the View menu, click Customers.

    The Customers form opens on top of the Orders form, and your custom toolbar disappears because it is associated only with the Orders form.

  15. Close the Customers form.

    The custom toolbar reappears.

  16. Right-click the Orders form.

    The standard shortcut menu appears.

    Tip

    Being able to display the shortcut menu could be a problem if you don’t want to give users the means to alter the form’s design. You can solve this problem by creating a custom shortcut menu and specifying it in the form’s properties.

  17. Press to close the shortcut menu, and then close the Orders form.

  18. Press .

    The standard menu bar replaces the custom one. (If you missed that change, you can press again to toggle between the standard menu bar and the custom one.)

    Tip

    Toggling between the menu bars is possible because you did not clear the "Use Access Special Keys" check box in the Startup dialog box. It is handy to have this option available while you are developing a database, but you might want to disable it when the database is ready to put into service.

  19. Press .

    This Access Special Key displays the database window—another reason why the Access Special Keys probably should not be available to users.

    Tip

    The only way to prevent a user from bypassing your startup options is to write and run a VBA procedure that creates the AllowByPassKey property and sets it to False. There is no way to set this property through Access. For information about how to do this, search for AllowByPassKey in the Help file available when you are working in the Visual Basic Editor.

  20. Close the database window, which closes the GardenCo database.

  21. While holding down the key, open the GardenCo database again.

    Holding down the key while you start the database bypasses all the startup options, so the database starts the same way it did before you set these options. You must continue to hold the key down while you acknowledge the safety warning.

CLOSE the GardenCo database.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset