Audit trail updates in 1 record, not 2.


G

gmazza

Hi there,
I implemented Allen Browne's Audit Trail code into my access project and it
works perfect.
However, when there is an update, it writes 2 records to the Audit table, the
audit type in the first record is an EDIT FROM as well as all the fields how
they looked before, and the next record the audit type is an EDIT TO as well
as all the fields how they looked before.

I was wondering, for updates, if I can have 1 record that would look like
this in the Audit table when an Update has been made on the form:

Edit From Goodfella Edit To Goodfellas

Right now it shows me all the fields in the table for both records and I have
to look through it long to try and find the change that was actually made. Is
there a way you can have 1 record, with the exact field the change was made
on, what it was before, and what it is now.

I hope I have been clear, here is Mr. Browne's Audit Trail code:
http://allenbrowne.com/AppAuditCode.html

Any help is appreciated!
 
Ad

Advertisements

T

tina

well, you (or someone) could probably write that kind of "track changes"
setup - but it'd be pretty miserable to do. each data edit in each field
would have to be tracked as a separate record, so you'd have include the
primary key in each, to track the recorded change back to a particular
record in the data table, and the fieldname of each data change, so you'd
know what field of the table the edited data was in, and probably a
date/time field. if multiple field values were changed in a single edit,
you'd have multiple records in the table... i don't know, sounds pretty ugly
to me, from a review standpoint alone, never mind the coding to create it.
Allen's setup provides a clear and easily followed audit trail; it shouldn't
be hard to isolate the before/after records of a specific edit, and a quick
visual comparision of the data should spot the change(s); in a maximum of
25-30 fields that shouldn't take more than a few seconds. if you have so
many fields in the table that it's laborious to check through all of them in
a two-record visual comparison, i have to wonder if your table is
normalized.

hth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top