Display Domain User Name on Form

Han_S_84

Registered User.
Local time
Today, 15:44
Joined
May 5, 2010
Messages
10
Hi

I am trying to display the users name (domain name) on a form.
All I can get to work is the currentuser() but this displays the access name Admin for all users.

I need to record who is adding records to the database which is shared access over the network.

I have also tried
GetNetworkUserName() and just get errors.

Any ideas will be much appreciated.

Thanks
Hannah
 
Look at the environment variables. They will have what you are looking for.
 
On most systems there is an systemvariable that holds the username.
Check in the windows shell what the name is by the command set then you can retrieve the username by:

Code:
environ("USERNAME")
 

Users who are viewing this thread

Back
Top Bottom