How to create a Log/Audit table

J

jhrBanker

I have a continueous form (bound to a query) thats used for entering,
modifiying and deleting records. I want to create a separate table for audit
purposes. The second table (ie; tblAudit) will contain all the same fields
as the first table, plus a field to contain one the following values:
NewRecord
DeletedRecord
OldData
NewData
When a new record is added, I want to add the record to the tblAudit table
as well.
When a record is deleted, I want to add a record to the tblAudit table with
the fields containing the values from the deleted record.
When any data on an existing record is changed, I want to add two (2)
records to the tblAudit table, one with the old data, and one with the new
data.
Any help (and sample code) will be very much appreciated.
 

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