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

Insert current user name into text field 1

Status
Not open for further replies.

MatthewP

Programmer
Jan 16, 2001
176
0
0
GB
How can I retrieve the current user name of an access database and place it in a field in a form when it is opened? I've managed to get the user name of the windows user bit I want the access username - surely this is available from somewhere?

Thanks in advance,
Matt.
 
Matthew,
Go and read this thread. It has the current user function listed and how to implement it. You will need to edit the code and then place it in some sort of after update or on open event to make your txtUser textbox in the form equal to the string value that you setup as the current user.

How to add current user to table
thread702-53601

Goodluck.

-Josh ------------------
-JPeters
Got a helpful tip for Access Users? Check out and contribute to 'How to Keep Your Databases from becoming Overwhelming!'
thread181-293590
jpeters@guidemail.com
------------------
 
Add the following to a text field in a form

=CurrentUser()
 
Or you can just do that. ;-)

=CurrentUser() is the user..
what's the CurrentGroup command? I couldn't remember and someone was posting that question yesterday.

-Josh ------------------
-JPeters
Got a helpful tip for Access Users? Check out and contribute to 'How to Keep Your Databases from becoming Overwhelming!'
thread181-293590
jpeters@guidemail.com
------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top