Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Do I Get The Windows NT Username or UserID ???

Status
Not open for further replies.

MarkDicken

IS-IT--Management
Jun 5, 2000
55
CH
From within Microsoft Access 97, how can I get the Windows (or Windows Workstation 4.0 Username)

I guess I need to do an API Call to Windows, if some one could point me in the right direction or CUT and PASTE a working copy then that would be great.

Many Thanks In Advance

Regards

Mark Dicken
England, UK
 
Here ya go.

Dim UserParam$
Dim sLogon as string

UserParam$ = Environ("S_USER")
If UserParam$ = "" Then UserParam$ = Environ("USERNAME")
sLogon = UCase$(UserParam$) Maq B-)
<insert witty signature here>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top