Onopen - Log

  • Thread starter Thread starter Ben Adams
  • Start date Start date
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
 
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
 
Back
Top