Access macros are stored in what are called macro groups and these groups are stored in the objects listed in the Macros list of the Database window. Each macro group is broken down into individual macros.
You can then edit these macros by using the Macro Builder, which will be discussed in the next lesson.
You can see the macro list in the Database window as well as an example of a macro group in this figure:
Two macro groups are displayed:
- The first macro, called TestMacro, displays a message box then opens a form.
- The second macro, called AnotherTest, simply displays a message box.
In a nutshell, Access macros are combined macro actions, each of which is selected from a list of macro commands.
You can then set additional arguments for the current macro action. You can see the arguments for a macro action in the figure, where it says Action Arguments.
Once you have created a macro, you can perform the following:
- Run a macro from the macro list in the Database window.
- Assign the macro group and macro name to an event attached to various Access objects such as forms, reports, and controls.
These events allow you to call macros (or code) when the user or computer causes an event to occur. Again, events will be discussed to a greater extent later in the module.
- Call the macro from another macro or VBA code.