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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

environs function to capture NT userid

Status
Not open for further replies.

burgesse

IS-IT--Management
May 29, 2002
7
US
How can I use the environs function, in a form to capture the NT userid of the person updating aform. There is a field called "username" on the form that should capture this.

Thanks
 
Attach the following to the load event of the form.
I added a text box called txtUserName:

Private Sub Form_Load()
Dim strUser As String

strUser = Environ("USERNAME")
Me.txtUserName = strUser

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top