Log exit time on database

  • Thread starter Peter McCartney
  • Start date
P

Peter McCartney

Hello All! A97. Thanking anyone for a reply!!

I have a table that logs entry time a employee gets into the database. The
database is only on one computer.

How can I log the time the user exits the database into that table ?

Peter McCartney
 
R

Rick Brandt

Peter McCartney said:
Hello All! A97. Thanking anyone for a reply!!

I have a table that logs entry time a employee gets into the database. The
database is only on one computer.

How can I log the time the user exits the database into that table ?

Peter McCartney

You can open a hidden form at startup that stays open the entire time the app is
in use. Then in its Close event, you can make the exit log entry. Any time
Access is closed the close event of all open forms will also fire first.

This will not work of course if the app freezes on the user or they hit reset or
the power switch.
 
P

Peter McCartney

Thank You!!



Rick Brandt said:
You can open a hidden form at startup that stays open the entire time the app is
in use. Then in its Close event, you can make the exit log entry. Any time
Access is closed the close event of all open forms will also fire first.

This will not work of course if the app freezes on the user or they hit reset or
the power switch.
 
J

John Vinson

How can I log the time the user exits the database into that table ?

The only way I can think of is to have a Form opened on startup (it
can be made invisible if you want), and have it stay open as long as
the database is open. (This is a good idea for a split database in any
case, to improve performance by keeping a recordset open!)

Add a record to the log table in this form's Close event.
 
P

Peter McCartney

Thanks Guys, its working well.

I put invisible controls on my password form to log the exit time from the
password form. (in code). Then I made the password form invisible after the
employee gained entry.

In my main form (switchboard) I made a reference in the close procedure code
to log the exit time from the database, in a invisible control on the
password form to take the date, set to Now(). Thus times are all stored in
the table.

Regards Peter.
(Australia to beat Ireland by 6 points tonight - Rugby Union.)
 

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