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

how to save user name to table?

Status
Not open for further replies.

xq

Programmer
Jun 26, 2002
106
NL
i am doing a database which has been set up security for a group of user, very time, one user is logged in, when he/she add records or update records, his/her name is supposed to be saved automatically in the table where they add data in or update data. how do i get their user name?
thanks a lot!
 
Use the CurrentUser() function.

For example you might have a hidden field bound to a field in the underlying table called LastUser. In the Before Update event of the form, you could then add the line:

Forms!frmYourForm = CurrentUser()

This would then update the underlying field in the table.

Cheers,

Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top