Actual windows user id

M

Mehmet Emin YALIN

Hello,

can anyone help me? How can i obtain the actual windows user id (NT user,
XP user etc.) in an access module? thanks in advance.
 
J

John

Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal
lpBuffer As String, nSize As Long) As Long

Public Function GetXPUserName() As String
Dim lpBuff As String * 25
Dim xRet As Long

xRet = GetUserName(lpBuff, 25)
GetXPUserName = Left(lpBuff, InStr(lpBuff, Chr(0)) - 1)
End Function


With GetXPUserName you know the user.


Sincerely

John

http://members.home.nl/jpeskens
 
Top