From the course: Access 2019: Macros

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Data macros and table events

Data macros and table events

From the course: Access 2019: Macros

Start my 1-month free trial

Data macros and table events

- [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…

Contents