Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need to log everyone that opens DB, even programmers

Status
Not open for further replies.

crpjaviman

Technical User
Jan 24, 2002
57
US
Hello All,

I am in the need of some code that will log the user name every time someone opens the database, even opening through the back door (programming view).

I have the code to get the user name from the computer, but I want to log it into a table right from the start.

I have tried an autoexec macro, but it will not work if it is opened in programming view.

Does anyone have ideas or suggestions?

Thanks,
crpjaviman

 
The ONLY way to do this (AFAIK) is to implement the access security module, prohibit the bypass process and force the 'opening' of the startup object to log users in a seperate db which is (obviously) accessed through code only. After all this, you MUST give someone (those dratted programmers) rights to modify the objects, so they can therefore easily circumvent the process in numerous ways.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Easiest way to do this is to have an unbound form that is opened hidden as a part of the startup process. You use the on open event to do your housekeeping such as grabbing the current user name, and the date and time and push that onto a table with a commentary like login. You use the on close event of the hidden form to do the same thing with the comment logout. Nothing to it. Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
Thank you both for your suggestions.

I don't really want to, but may have to, implement the security procedures. Depending on how I implement them, they will be affecting most or all of the databases, from what I have been told.

The hidden form was not essentially my way of recording the login/logouts. I was planning to openrecordset and run code to add a new record. I think this may be a little faster.

I have found a database that someone created to lock/unlock the databases. I am going to continue doing this for now.

Thanks again.

crpjaviman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top