That's not particularly secure: it's trivial to reset environment variables.
The API approach is far better.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
"Wayman Bell" <(E-Mail Removed)> wrote in message
news:CXLab.388753$cF.118886@rwcrnsc53...
> 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
>
> "Joel" <(E-Mail Removed)> wrote in message
> news:074401c37d5f$6dac9d60$(E-Mail Removed)...
> > 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.
> >
>
>