How to capture the User authentication user name using Access 2000

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.
 
W

Wayman Bell

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
 
D

Douglas J. Steele

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

The API approach is far better.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top