Logging Inserts BeforeUpdate and AfterUpdate still occur when the user saves a new entry. To do this, the form must pass an argument to our code indicating whether this was a new record. That's easy in BeforeUpdate, but by the time AfterUpdate fires, the form's NewRecord property will always be false. The form needs a module level variable set to the value of Me. NewRecord in BeforeUpdate, so as to provide that value again in AfterUpdate.
Access opens a new code window.
Copy the code in this link , and paste it into the module. Choose Compile from the Debug menu. Fix any errors Access highlights. Save the module with a name such as ajbAudit . For each table you wish to audit, you will create two more tables, as follows.