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

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,
 
T

Tom van Stiphout

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
 

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