Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to capture users

Status
Not open for further replies.

shy216

Programmer
Jul 21, 2005
142
US
i just set the security using the user-level security wizard. it seems it's very easy to control the permission and heirchy etc... but how do i make it so that when a certain logs on and changes or updates data, it can capture who made those changes?
 
Add 2 fields to your table: dtmModified as Date and strModifiedBy as string. And place these 2 fields on your form.

In the BeforeUpdate Event of your form, add this code:

dtmModified = Now
strModifiedBy = CurrentUser
 
ok.. but where? like the main form rite?
 
and is that gonna automatically capture the current user on the field? and dtmModified has to be a date field rite?
 
The given method will work assuming the user is using a form to input data. I'm not aware of a way to log the changes when a user just straight up changes the data in the table.

If that's not a problem, then yeah, you can just put that code in the form where the user inputs the data and it'll work out.
 
so there's no way of doing it just by log in?

like set the security log in and pw
?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top