Share this Page URL

Chapter 4. Importing and Linking to Data > Linking to Data - Pg. 129

Importing and Linking to Data 129 More about macros We'll cover macros in more detail in Chapter 13, where we'll use macros as part of an application switchboard, a form that helps direct the flow of database operations. In that chapter, you'll learn how to create more complex macros than the one we create in this section, including macro groups and macros that use conditions to run under specific circumstances. Here are the steps to create a macro. Define macro actions 1. In the Database window, click Macros in the Objects list, and then click New. You'll see the Macro window, shown here: 2. When you create a macro, you select the actions you want the macro to take, identify the database objects and controls that the macro will act on (the form to open or the report to print, for example), and provide information the macro requires to perform its operations. As you can see, the Macro window also contains a Comment column. Use this column to annotate the actions a macro is performing. Adding comments helps document the purpose of the macro, which makes database maintenance and modifications easier later on. In the first row, open the drop-down list in the Action column, and then scroll down the list, which should give you a sense of the range of actions macros can perform. If you want more information about a macro action, select it from the list. A description of the action appears at the bottom right of the Macro window, as shown here. You'll also see the Action Arguments area, where you provide the names of database objects and other infor- mation that the macro's actions require. Each action has its own set of arguments.