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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top