Auto Logout - User settings

Dazzy

Registered User.
Local time
Today, 12:31
Joined
Jun 30, 2009
Messages
136
Hey All

I am using this http://www.peterssoftware.com/isd.htm in our project but have made a minor change so it logs people out rather than close Access completely. It works beautifully but I want to take it a step further.

I was wondering could anyone help me make a small modification to this code.


Instead of hardcoding the times in these two values


intMinutesUntilShutDown = 10


intMinutesWarningAppears = 2

I'd like to give users the options to set these themselves as not everyone will be the same.

I am thinking I would have to check for who is currently using the database, this is stored in a hidden form in the following field.


[Forms]![frmwhoson]![whoson]


This username matches the users First Name in table Employees and in this table I have two fields to store these values


logmeoutafter
showlogoutmessagefor

So passing these values for the current user rather than having the logout times hardcoded.

Is there anyway to do this?

Thanks
 
On startup you can use a recordset or DLookup() to get the two values from the table. You can store them in global variables or textboxes on your hidden form. Then use those instead of the hard coded values.
 
Thanks pbaldy, I was fooling around yesterday with dblookup and got nowhere but I noticed today I had the wrong notation.

Thanks again
 

Users who are viewing this thread

Back
Top Bottom