TimeStamp

  • Thread starter Thread starter peter
  • Start date Start date
P

peter

I have a secure access 2000 db that requires users to
login with a username and password. Is there a way to
record what time each user logged into the database?
Could this time record be automatically stored in a table?
Any direction or advice is appreciated as always.
thanks.

Peter.
 
Hello Peter

How is the database secured? How do the users log in?

If you control the log-in process via a form, you can use the TIME()
function to record the computer's current date/time and record that
value in the appropriate table.
 
I use access user-level security. they are prompted for a
username and password before any objects in the db are
viewable.
 
If they log in using user-level security, you could create a form or module
that runs when the database is opened. A record would need to be added to
a tabel that stored the ID, time, and date logged on. When they log off the
table would need to be updated.

The form could be set up to open in hidden mode. The code could be tied to
the forms Open and Close events. If the database crashes, the close event
would not run.

Do some searches and you may find some links to more information. I built
this into one of my databases, and the code was given to me here on this
newsgroup about two years ago. Because I ended up with orphaned logon
records when Access would crash, I ended up removing it from my code. If
your network/pcs/application are pretty stable, then you might give it a
try.


Rick B
 
Back
Top