Security record

Voodoo223

Registered User.
Local time
Yesterday, 20:15
Joined
Jun 16, 2005
Messages
16
I've been reading through posts the last couple of days, and have found elaborate resolutions to what I need.
What I am looking for:
I have a fairly simple database with Access security-wizard setup.
What I would like to have, is a table of users logging in. All I want to know is who is using the database and when.

Also, I do have a popup form that starts, and clicking the 'OK' command button opens the switchboard. So if I could request user info with that form that would be perfect. I would like the user data (access user name and date/time) to go into its own table with fields of 'USER' and 'LOGIN TIME'. ID field is fine if necessary.
 
Last edited:
There are three events that make sense here.

In your startup form, you have Form_Load, Form_Close, and a button click on that OK button on the form. Behind any of these, you could open a recordset to store the current time and date (from the Now() function) and the current user (from CurrentUser() or one of the Get-Environment functions posted in this forum.)

If you use the button click to say it is closing the form, you can also update your user history table. If the button click actually minimizes and hides the startup form but never actually closes it, then you can use Form_Close (which occurs when Access exits) to log an exit event. In which case the OK button becomes the enter event.

There is also the chance that you can use other tables and a form timer to do neat things from the hiddent startup form. Like, have a table of scheduled events for maintenance and check once per minute to see if it is now time to shut down the database. Other nice things also are available from that feature. Just because a form is minimized and hidden doesn't mean it can't do lots of nice things for you in the background.
 

Users who are viewing this thread

Back
Top Bottom