Hi People....
I was wondering if anyone here had already invented the wheel, so I don't have to re-Invent it.
What I want to do is add an Inactivity timer to my Database, (Could be that the user minimized the database or left the computer)
It should warn the user after 2 minutes of inactivity, and then quit the database after another minute.
I have made a timer but it is no good, it is a timer event on the Main Menu, set to 1 minute, every minute it runs this function:
Function CheckInactivity() As Boolean
Select Case Inactivity
Case 0
Inactivity = 1
Case 1
DoCmd.OpenForm "frm_Inactivity", acNormal, , , , acDialog
Inactivity = 2
Case 2
DoCmd.Quit acQuitPrompt
End Select
End Function
and then on the Main menu I have put an event on Mouse Move. that will set Inactivity to 0 when mouse is moved over..
The only problme is that if a user spends more than 2 minutes away from the main Menu for example: on a sub Menu or on a form/Report, the message will pop up.
and eventually quit...
I could add the mouse move event for every form/report, but that is going to be a lot I have way to many to do that, so I was hoping that there might be an easier way of doing this...
Also if there is a way of on a quit event, check if a user is in the middle of filling in a record, If he is but has been inactive it will cancel the record and quit... not only quit with a half saved record....
Any ideas would be higly appreciated....
Brian....
Eldaria
That was my 25cent** of opinion.
** Inclusive Intrest, tax on interest, Genral tax, Enviromental tax, Tax, and tax on intrest, tax on fees, tax on tax, and other Various taxes and fees.
I was wondering if anyone here had already invented the wheel, so I don't have to re-Invent it.
What I want to do is add an Inactivity timer to my Database, (Could be that the user minimized the database or left the computer)
It should warn the user after 2 minutes of inactivity, and then quit the database after another minute.
I have made a timer but it is no good, it is a timer event on the Main Menu, set to 1 minute, every minute it runs this function:
Function CheckInactivity() As Boolean
Select Case Inactivity
Case 0
Inactivity = 1
Case 1
DoCmd.OpenForm "frm_Inactivity", acNormal, , , , acDialog
Inactivity = 2
Case 2
DoCmd.Quit acQuitPrompt
End Select
End Function
and then on the Main menu I have put an event on Mouse Move. that will set Inactivity to 0 when mouse is moved over..
The only problme is that if a user spends more than 2 minutes away from the main Menu for example: on a sub Menu or on a form/Report, the message will pop up.
and eventually quit...
I could add the mouse move event for every form/report, but that is going to be a lot I have way to many to do that, so I was hoping that there might be an easier way of doing this...
Also if there is a way of on a quit event, check if a user is in the middle of filling in a record, If he is but has been inactive it will cancel the record and quit... not only quit with a half saved record....
Any ideas would be higly appreciated....
Brian....
Eldaria
That was my 25cent** of opinion.
** Inclusive Intrest, tax on interest, Genral tax, Enviromental tax, Tax, and tax on intrest, tax on fees, tax on tax, and other Various taxes and fees.