Conrad Addo
Conrad Addo

Reputation: 440

Get original username of person launching MS Access if using remoteapp and runas other user

I would like to get the username in VBA of the person who launched the RemoteApp MS Access application. I have set it up to have everyone log into the application using a service account (called "svcactuser") so that Access/SQL Server can manage the connections without table locks and to run SPs. Typically in any Access application I would use:

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

Now I need another way to get the actual user username (not the service account username "svcactuser"). Can you tell me how in VBA I can get this information?

Thanks

Upvotes: 0

Views: 176

Answers (0)

Related Questions