Update Loging

J

Jason

How can I save the current date and user to two fields
when they make a change to a paticular record. I want to
recored "Last Modified By" and "Last Modified On" for
each update of a record through a Form.

Thanks,
Jason
 
L

Larry Stewart

In the Form_BeforeUpdate event, do the following:

Me.lastModBy = CurrentUser()
Me.LastModOn = Now()
 
T

TC

As long as the OP undertsnads that CurrentUser() will always return "Admin"
unless:

(1) He has created some users in his workgroup file, and

(2)
(a) he has assigned a password to the Admin user, so that everyone must
log-on with a username/password when they open the database; or,
(b) he starts the database using a shortcut including the /user switch to
identify the current user.

HTH,
TC
 

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