I'm trying to create an audit log using Access 2010 macros. I have a macro that checks a single table field to see if it's changed, and then writes a record to the audit log if it has. That works fine.
The problem is that I need it to check ALL fields in the table and, for each one that's changed, write a record to the audit log table. I don't see a way to loop through all fields in a table record and check each one to see if it's been changed. Is there a way to do that?
The code I'm using to check a single field basically goes:
If Updated("MyField") Then
Create a Record In MyLogTable
SetField (OldValue, [Old].[MyField])
SetField (NewValue, [MyTable].[MyField]
...
End If
Any help is appreciated.
Thanks!
Neil