Access macros support the use of variables that can be set, modified, and removed over the course of the macro’s execution. Local variables are only used inside of the macro that they’re created in and are immediately removed from memory once the macro completes. Temporary variables can be used outside of the macro and persist until they are specifically removed from memory through the RemoveTempVar action.
- [Adam] Access Macros support the use of variables…that can be set, modified, and removed…over the course of the Macro's execution.…Let's open up a new Macro in the designer,…and in the action catalog I'm going…to expand the Macro Commands folder.…There's two different actions that I want to take a look at.…The first is SetLocalVar.…SetLocalVar will establish a local variable…that can only be used inside of the Macro,…and it exists only until the Macro finishes.…As soon as the Macro completes its process…the variable is removed from memory.…
The other one that I want to take a look at,…if I scroll down, is the SetTempVar action.…This one establishes a temporary variable.…These'll persist after the Macro finishes,…and can be used outside of the Macro,…for instance in a form or another Macro.…Access will remember up to 255 temporary variables,…but they all get removed when the database is closed.…It's important to remember to run the RemoveTempVar action,…here, when the variable is no longer needed,…or RemoveAllTempVars to clear out…
- Creating multi-step macros
- Triggering macros
- Running macros at startup
- Adjusting the execution and flow of macros
- Troubleshooting macros