How to capture the User authentication user name using Access 2000

  • Thread starter Thread starter Joel
  • Start date Start date
J

Joel

I need to capture the Windows User Name and store it for
future reference using Access 2000. In a form, I have a
text field with a default value of =CurrentUser() and the
application returns "Admin" regardless who the user is.

Does any one have any information or have the code to
capture the user name from the Windows authentication
user name, used when login into the network.

Your help is much appreciated, Joel.
 
In my table I set the default value for the field to;

=Environ("Username")

In forms I use a label

In the forms propertíes, On Open, I have proceedure:

lblText.Caption = environ("Username")

Works great

WB
 
That's not particularly secure: it's trivial to reset environment variables.

The API approach is far better.
 
Back
Top