Actual windows user id

  • Thread starter Thread starter Mehmet Emin YALIN
  • Start date Start date
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.
 
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
 
Back
Top