VBA & Macro Problems

How to Fix Access Data Macros for Tracking Record Changes

Steve KSteve K Oct 29, 2026 870 views

Question details

An Access data macro fails to create an audit record when a specific field is updated through a form.

How to Fix Access Data Macros for Tracking Record Changes
Product
Microsoft Access
Device & OS
not provided
Scenario
Setting up a data macro to track and audit modifications to a VendorName field via an entry form.
Observed behavior
The macro does not trigger or insert a new record into the audit table when the field value is changed.
Before you start

Ensure that your target audit table (e.g., tblAudit) is already created with the correct field names and data types to store the tracked changes.

Solution 1Recommended

Correct the Data Macro Condition Syntax

Fix syntax errors in your data macro condition to ensure Access properly detects field updates.

Data macros in Microsoft Access require highly specific syntax to function correctly. A common mistake when auditing field changes is using the incorrect function name or forgetting quotation marks. The function to check if a field was modified is 'Updated', not 'Update'.

1
Open Table in Design View

Open your Microsoft Access database and navigate to the main table where your data macro is applied.

2
Access Data Macros

Click on the 'Table' tab on the ribbon and select 'After Update' under the Data Macros group to open the macro designer.

3
Fix the Condition Statement

Locate the 'If' block checking for field changes. Change the condition from Update("VendorName") to Updated("VendorName"). Ensure the field name is enclosed in exact quotation marks.

4
Verify Audit Expressions

Check the 'Create a Record In' block. Ensure that the expressions matching your audit table fields correspond exactly to your table structure (e.g., setting the audit field to [Old].[VendorName]).

5
Save and Test

Save the macro, close the macro designer, and test the process by changing the VendorName in your form to verify the audit record is created.

Correct the Data Macro Condition Syntax
Syntax Sensitivity: Always remember that data macros are sensitive to exact string matches. Misspelled field names or missing quotation marks will cause the macro to fail silently.
Free Microsoft Office alternative

Looking for a simpler way to manage and track data?

While Microsoft Access handles complex relational databases, WPS Office provides an excellent, free alternative for everyday data management. With WPS Spreadsheet, you can easily track changes without writing complex VBA code or troubleshooting macro syntax.

  1. 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
  2. 2. Import Your Data: Open WPS Spreadsheet and easily import your existing data tables or CSV files.
  3. 3. Enable Change Tracking: Navigate to the 'Review' tab and enable 'Track Changes' to effortlessly monitor all edits without macros.
Track data changes effortlessly with built-in review tools.Fully compatible with Microsoft Excel (.xlsx) formats.Free, lightweight, and fast-loading alternative to Microsoft Office.Familiar user interface that requires no learning curve.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my Access data macro not triggering on field updates?

This is often due to a syntax error in the condition statement. For example, using 'Update([FieldName])' instead of the correct syntax 'Updated("FieldName")' will prevent Access from recognizing the modification.

What is the difference between a data macro and VBA in Access?

Data macros operate at the table level, meaning they will trigger regardless of how the data is modified (e.g., via forms, direct table edits, or queries). VBA is typically bound to forms or reports and only runs when data is changed through that specific user interface.

How can I capture the previous value of a field before it was changed?

In an Access data macro, you can reference the previous state using '[Old].[FieldName]'. In Form VBA, you can capture it using the '.OldValue' property of the specific form control, such as 'Me.VendorName.OldValue'.