BeforeChange |
Before a record is inserted or changed, you may want
to:
- Check a value in another table and stop the
insert or change from happening.
- Compare the old and new values and raise a warning
or prevent the change
- Change the value of one or more fields before
the change is applied to the database
Note: Occurs for both inserts and changes.
You have to use the IsInsert property to detect if it is
a new record.
|
BeforeDelete |
Before a record is deleted you may want to:
- Check a value in another table and stop the
delete from happening.
- Update an audit file indicating the record was
deleted.
|
AfterUpdate, AfterInsert, AfterDelete |
After a record is changed, inserted, or deleted, you
can:
- Loop through a set of records in a table
and update records that meet certain criteria.
For example, if an order status is set to 'Complete,'
you might want to update a pending financial
transaction status.
- Send an email notification that the record
has been updated.
- Run another data macro
- Create another record
|
Microsoft has created a short video that demonstrates how
to create a data macro: