I have an Access 2007 database where I'm auditing changes to a database table that are made from within a form. I'm using the following technique:
1. Before update, I write the current table entry (row) to a temp table.
2. After update, I call a function that (a) copies the row from the temp table to the audit table (this is the before image) then (b) copies the row from the database table to the audit table (this is the after image).
The problem I am having is that unless I wait for the update of the database table to complete, the step 2b copies the row before the update has taken effect... even though is contained within the After Update event.
If I put a "wait" of 2 seconds before step 2b, it works perfectly.
It's as if the form issues the insert or update event, then proceeds executing VB instructions without waiting for the I/O event to finish. Does this make sense? Is there a way to tell Access to wait for the I/O to finish?
By the way, the tables are linked and contained in a "backend" access database.