Creating Table Data Macros
In Microsoft Access 2010, you can define a data macro to respond to different types of table events that would otherwise require the use of writing Microsoft Visual Basic code or the creation of macros attached to forms and reports. The unique power of data macros in Access 2010 is their ability to automate responses to several types of table events without forcing you to learn a programming language. The event might be a change in the data, the creation of a new record, or even the deletion of an existing record. Within a data macro, you can include multiple actions and define condition checking so that different actions are performed depending on the values in your table fields or criteria you specify.
In this tutorial:
- 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