Tutorial 11 Configuring Startup Options in an Access Database

Tutorial 11 Configuring Startup Options in an Access Database

Tutorial 12: Configuring startup options in an Access database

This tutorial takes you through different ways to configure a database when it is opened. You’ll need the Get fit database that you’ve been working with in previous tutorials.

The Startup options window

In Microsoft Access there are several ways of opening a form or carrying out other actions when the database starts. The easiest way is to configure the Startup options on the Tools menu.

All you need to do is set your Front end menu form as the one which will display when the database starts. You can do this by setting the Display Form/Page property – see figure below.

Startup dialog box

A drop-down list will allow you to select the required form.

Have a look at the other options in this dialog box. To protect your database objects from accidental changes by users, you can uncheck most of the boxes in this window. There are also more options to explore under the Advanced button at the right of the screen.

Configuring Startup using macros

Alternatively, you can create a macro that opens your front end menu form. The advantage of creating a macro for the purpose, is that you can build other actions into the startup routine, such as checking the linking of external data sources.

To get the macro to run when the file is opened you must save it as AutoExec. It’s useful to know that the AutoExec macro is run after the Startup properties have been set, and can overwrite the settings.

By-passing the startup settings

In the Startup dialog you can disable the main database window, menus and toolbars which means that when you open the database you will only be able to operate the database as a user. What if you need to access and change the database? The solution is provided below.

Solution: Hold down the Shift key when you open the database. This bypasses the Startup properties and also the AutoExec macro.

This does not bypass security features you might enable.

Keep an unprotected copy to ensure against protection problems.

Hint: Do not tell your clients about this Shift Open feature!

Practice activity

In this activity you’ll configure the database startup options.

Open the Get Fit database you downloaded earlier (get_fit_ot.mdb).

1Set the Display Form/Page property in the Startup dialog to your front end menu form you created earlier (frmFrontEnd) so that your menu form opens automatically when the database is opened.

2Test that the form opens as expected by closing the database and opening it again.

1

2005