How to create a log of when a user made a add/modify/delete

  • Thread starter Thread starter ChicagoPete
  • Start date Start date
C

ChicagoPete

In Access 2007 I am looking for a way to store in a table the user name, date
and time of when this person made a add/modify/delete action to a record. I'm
thinking of hidden fields that can be used by admin to audit any funny
business in my db.

How can you capture the MS Windows user name and date/time of a
add/modify/delete event?

Thanks,
 
On Fri, 25 Jul 2008 11:46:35 -0700, ChicagoPete

The username can be captured using code like this:
http://www.mvps.org/access/api/api0008.htm
And bookmark that site!

The datetime is captured with the Now() function in VBA.

You need to write your code in several form-level events. AfterInsert,
AfterUpdate, and Delete come to mind.

-Tom.
Microsoft Access MVP
 
Back
Top