User's Name or PC Name

Joined
Dec 19, 2007
Messages
3
Reaction score
0
Hi to all,

I've a table and i want to save a field in automatic the windows user's name or the PC Name ,

can you please help me with this!!!

thanks a lot

Gene
 
You can use the following to see various Environment variable values in Access 2003.

For i = 1 To 31
z = Environ(i)
Debug.Print i; z
Next i

when i = 6 you get the ComputerName
6 COMPUTERNAME=HOME-6399619597

when i = 28 you get the User name
28 USERNAME=user
 
Back
Top