Having Name Show on Form After Logging in

skilche1

Registered User.
Local time
Today, 03:36
Joined
Apr 29, 2003
Messages
226
Hi,

I am trying to add the name of the employee show up in on the opening form after logging into the database. I am able to get the user right (Admin only), but not the name. In the Default Value in Properties, I have it set to =CurrentUser() and I have the Employee field in the Control Source to record current user.

How can I make this so it indicate the user logged in?

Thank you.
 
try =environ("username") which will give the windows login name

otherwise, when you user logs in you need to store the username somewhere - could be a permanently open form (e.g. hide the login form), could be a global variable in a standard module. All depends on how your users log in as to what the name is
 
I am still an Access beginner, but I also had a need for this. I put it into a function, which made it very easy to access when writing my queries. Good luck

Public Function return_user_ID()
return_user_ID = UCase(Environ("UserName"))
End Function
 

Users who are viewing this thread

Back
Top Bottom