Access 2016 Advanced

Lesson 11 – Using Macros

Access 2016

C REATING AN A UTOEXEC M ACRO

Discussion

While you can select a command to run a macro, you can also have a macro that runs automatically when a database is opened. This type of macro is called an Autoexec macro because it is automatically executed when the database is opened.

Create an Autoexec macro to automate or simplify the database for other users. For example, assume that you want someone in your office to add customer orders on a specific form. To ensure that they use the correct form, create an Autoexec macro that opens the form for them.

Create an Autoexec macro in two ways. Rename an existing macro Autoexec , or you can create a new macro and save it with the name Autoexec . Since the Autoexec macro is stored with the database, each database can have its own Autoexec macro. However, you can only have one Autoexec macro per database.

NOTE You can bypass the Autoexec macro by holding the [Shift] key while you open a database.

Procedures

1. Open the desired database. 2. Display All Access Objects in the Navigation Pane, if necessary. 3. Right-click the macro name you want to rename.

4. Select Rename . 5. Type Autoexec . 6. Press [Enter] .

Step-by-Step

Create an Autoexec macro by renaming an existing macro.

If necessary, display All Access Objects in the Navigation Pane.

Page 134

OFFICEPRO, Inc.

Made with FlippingBook - Online magazine maker