Tracking user changes to records 
Author Message
 Tracking user changes to records

Access97

I have a bound form with several bound subforms.
When the user clicks "save" I would like to review all the changes and write
the field name, old value & new values for each change.

My first inclination was to create a snapshot copy of the recordset at the
time the form opened and then make another recordset with the same query
after the save operation and then compare the two and make the list of
changes.

The problem is that, if a record has been deleted, you cannot refer to the
deleted record even if it is in the snapshot recordset and the snapshot has
not been updated. The data is there (I can view it in the debug window), but
Access will not let me refer to it.

Next, I thought about making arrays of the original data and then comparing
the arrays with the saved data, but the arrays go out of scope after the
form completes loading so they are not there after the save. I've tried
creating the arrays with "Static" and this doesn't help.

Does anyone have any suggestions?

Randy Sermons



Mon, 04 Oct 2004 07:54:02 GMT  
 Tracking user changes to records
Take a look at the discussion and suggested solution:
    Audit Trail - Log changes at the record level.
at:
    http://users.bigpond.net.au/abrowne1/AppAudit.html

The article addresses edits, inserts, and deletes for a form. It can also
be implimented for a subform.

--
Allen Browne, Microsoft MVP (Most Valuable Professional)
Perth, Western Australia. To reply, remove "_SpamTrap".
Tips for MS Access users:
    http://users.bigpond.net.au/abrowne1


Quote:
> Access97

> I have a bound form with several bound subforms.
> When the user clicks "save" I would like to review all the changes and
write
> the field name, old value & new values for each change.

> My first inclination was to create a snapshot copy of the recordset at
the
> time the form opened and then make another recordset with the same query
> after the save operation and then compare the two and make the list of
> changes.

> The problem is that, if a record has been deleted, you cannot refer to
the
> deleted record even if it is in the snapshot recordset and the snapshot
has
> not been updated. The data is there (I can view it in the debug window),
but
> Access will not let me refer to it.

> Next, I thought about making arrays of the original data and then
comparing
> the arrays with the saved data, but the arrays go out of scope after the
> form completes loading so they are not there after the save. I've tried
> creating the arrays with "Static" and this doesn't help.

> Does anyone have any suggestions?

> Randy Sermons



Mon, 04 Oct 2004 10:59:26 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Keep Track of Excluded Users for each Record

2. Keep Track of Excluded Users for each record

3. Help! --Tracking Changes to Records

4. Tracking record changes

5. JCN - KEEPING TRACKS OF ALL CHANGES TO RECORDS IN AN ACCESS DATABASE

6. How to track a user session when user leaves my domain

7. How to track a user when user leaves my domain

8. Error: Another user may have edited or changed the current record

9. Multi-user record change problem.

10. record locking and changed data by other user on MSQL

11. keeping Track Of Record

12. losing track of current record

 

 
Powered by phpBB® Forum Software