
Does anybody know how to create an Audit Trail in Access
Hi Paul.
I have a series of functions that I use to populate fields for an audit trail in
one of my databases. It works like this:
When the user logs in, I collect information about the user (Name, Dept, & Other
Stuff). All that goes into Global variables.
I have simple functions that do nothing but return the value of the global
variables. Such as
Function ReturnUserName() as string
ReturnUserName=glbUserName
end Function
Now, in most of my tables, I have audit fields, whose default values are set to
the functions. For example, in table CONTRACT I have a field called CREATOR.
The field CREATOR is never the data source of any control on any form, but it's
default value is set to ReturnUserName() in the table definition. Now anytime a
user causes a record to be created in that table, his user name (or any other
information I want to keep) is saved with the record.
Likewise CREATEDATE fields have a default value of NOW(), which records the time
and date the record was added.
Hope that helps
Mark Walters
(Remove the DONT_SPAM_ON_ME to reply by email)
Quote:
> Does anybody know how to create an Audit Trail (user,query,status,Date/Time)
> in Access ?
> Thanking you in advance
> Paul Andrews