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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Rows and user security

Status
Not open for further replies.

ADB1

Programmer
Aug 24, 2001
235
GB
All,

I have an access database with some security on it. How would I have a column on a table that automatically has the username of the user that entered that row into the table?

Basically, any data entered into the database can be tracked against different user id's. Also how woudl I have a date stamp against a row so you can see when the data was written?

Ta.

A.
 
Create 3 new fields in the table (user,date created, date modified)
In the BeforeUpdate event procedure of the data entry form:
If Me.NewRecord Then
Me![date created control] = Now
End If
Me![date modified control] = Now
Me![user control] = CurrentUser

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks PHV i'll give it a try. I'll also no doubt have more questions in a bit!!

A.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top