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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

On close database property ?????

Status
Not open for further replies.

sirkenj

Technical User
Apr 30, 2002
52
US
Hello again. This one should be pretty simple. I have a front-end db (2000) which I want to audit the use of. I have a proceedure which gives me NT logon, db logon, machine name, and time in. This data is loaded into a table, and is set when the opening form of the database loads (OnLoad) I'm trying to figure out where to place the code to trigger recording the same information for when the user leaves the database. I thought of placing it on the same forms OnClose event, but there are a few exceptions I need to deal with:

1. I use the timer on this form to close the database automatically after 15 min of inactivity, and don't know how this will effect the OnClose event.
2. If the users computer crashes, or the application is shut down through the task manager, would the OnClose event of this form still be triggered?
 
I dont think there is a built-in function. However, using a hidden form which writes an exit-log in the close event works pretty well (as you said above).

1. Should have no effect

2. At the end of the day, if the computer crashes, no events will be logged (system etc), so you cannot expect your application to log anything. If the user carries out an 'End Task', & the program is deemed as not responding, I suspect it will not be logged.

James Goodman MCP
 
Followup:

If closed in the Task Manager (or by Windows Shutdown), and Access isn't in fact hung, the Form_Close event will be triggered.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top