LogOut

connerlowen

Registered User.
Local time
Today, 08:49
Joined
May 18, 2015
Messages
204
Hi,

I have a fully functioning login screen with a combo box for name and a password box. It also has an option to create a new user or exit the database. On my main form I want the employees to have to log out of the database as opposed to close it out. How would I go about this? Also I need some help in tracking login and logout times for each employee.

Thanks.
 
You will NEVER get them to logout reliably.
I have code in my login screen that creates a USER class. Its global and just sits in memory, waiting, lurking. It has a terminate event.
When the database closes, the class terminates, and the last event writes to my log file.
 
If I do have a logout button and they click on it what do I need to have it do in order to have it log the time and reopen the database with the login screen as a popup?
 
what I do is when my database OPENs it calls an autoexec macro, which runs a function called DATABASE_START.

This function does everything. Ensures the back end is connected, Gets a user login, Launches the switchboard. etc.

If I want a restart button, then I close any forms that are open, close the switchboard, and then run the above startup procedure.

Within the startup proc you can log the starttime
Within the restart proc you can log the endtime

Note the caveat ranman pointed out. A user can always just open task manager and kill access - which will definitely by pass your logout procedure!
 

Users who are viewing this thread

Back
Top Bottom