Onopen - Log

B

Ben Adams

Would like to create a "Log" of who is opening a
database...I can either write to a table or text file,
doesn't matter. How do I capture the user/computer that
opens the database?

Thanks
Ben
 
N

Nikos Yannacopoulos

Ben,

Environ("UserName") will return the Windows logon name of a user
Environ("ComputerName") will return the computer name

They will both work virtually anywhere (in Macros, code, queries, forms,
reports...) and they come very handy when Access security is not applied, so
users cannot be identified as per their database user name. I use the former
extensively, not only for the purpose you are looking for, but also for
granting user rights behind the scenes (enabling / disabling command buttons
etc.) without the users even realizing their environment is user-specific.

HTH,
Nikos
 

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

Top