Data macros are an entirely different kind of macro. They’re connected to data tables and are triggered when something changes in the table. In this video, Access database expert Adam Wilbert demonstrates how to create an automatic logging system that records when records are added or deleted from a table.
- [Instructor] Data macros are an entirely…different kind of macro.…They're connected to data tables,…and are triggered when something changes in the table.…They're most commonly used to essentially watch…what gets entered into a table,…and then respond to that entry event…by creating a log, noting the change that happened,…and recording the time and date when the change was made.…Let's create a simple logging system…to help keep track of changes that are made…to H-plus Sport's orders table.…First, we're going to need a table to store…the change log in.…I'll go up here to the create tab…and we'll start a new table in design view.…
The first field is going to be log ID.…I'm press tab to come over here to the data type field…and I'm going to choose A for autonumber…and come down to the next line.…The second field will be the order ID…and this is where we'll store the order ID…that's being changed back in the orders table.…We'll choose the number data type for this.…Next we're going to have a date stamp…and the data type will be date and time.…
- Creating multi-step macros
- Triggering macros
- Running macros at startup
- Adjusting the execution and flow of macros
- Troubleshooting macros