The Data Macro Design Facility
The following sections explain how to work with the macro design facility in Access 2010.
The older macro design window was not the most intuitive interface to work with. For example, when you wanted to create a new action for a macro, you selected the action in the upper part of the window, but you entered the arguments in the bottom part of the window. The Arguments column in the upper part of the window was read-only, so you constantly needed to switch from the top window to the bottom window. You also could not create complex nested logic conditions for your macro execution, and the readability of the macro elements was difficult to follow.
In Access 2010, Microsoft redesigned the macro design window so that Access developers could be more productive when creating macros in their applications. The Access development team at Microsoft studied user interactions with the older macro design window and came up with five main goals in their redesign:
- Increase productivity of application developers by adding features such as the Action Catalog, IntelliSense for writing expressions, support for copy and paste, and keyboard accessibility improvements.
- Support more complex logic execution with macros by allowing nested If/Else/Else If constructs.
- Increase the readability of macros by having the macro design surface display the program flow more like Visual Basic code.
- Create macros faster by reusing existing macros in other parts of the database.
- Support the ability to share macros easily with other users and other applications through the use of Extensible Markup Language (XML).
In this tutorial:
- Creating Table Data Macros
- Uses of Data Macros
- The Data Macro Design Facility
- Access New Logic Designer
- Working with Before Events
- Grouping Macros
- Using If Blocks to Create Conditional Expressions
- Raising Errors in Data Macros to Cancel Events
- Testing Your Data Macro
- Defining Multiple Actions
- Collapsing and Expanding Actions
- Moving Actions
- Preventing Duplicate Records Across Multiple Fields
- Before Delete
- Working with After Events
- After Update
- After Delete
- Working with Named Data Macros
- Saving Named Data Macros
- Calling Named Data Macros
- Renaming and Deleting Named Data Macros
- Analyzing Errors in the USysApplicationLog Table
- Using Parameters
- Using Local Variables
- Working with Return Variables
- Debugging Data Macros
- Understanding Recursion in Data Macros
- Sharing Data Macro Logic