Access Security

sbayeta

New member
Local time
Today, 09:52
Joined
Jul 11, 2004
Messages
6
Hi,

I've just setup security in my database, and it works fine. Now I'd like to know if it is possible to determine the currently logged user from VBA, since I'll be logging the actions users perform.

Is there any function that returns the logged user ?

Thanks in advance.
 
Yes, there is, and I'm sure you'll love how disgustingly complicated it isn't. The function is:

User()
 
The CurrentUser function will do what you want if you are user Access security with workgroups and user names. The Environ function will help you grab info about the user and their computer.
Code:
MsgBox "Current User  = " & CurrentUser

MsgBox "Network ID =  " & Environ("UserName")
 

Users who are viewing this thread

Back
Top Bottom