Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

On Timer Event - Modify MsgBox Properties 1

Status
Not open for further replies.

gbobbie

Technical User
Aug 9, 2006
52
US
I have created an on timer event that mimics the MKB article found here: The only difference is that I changed the IDLEMINUTES to 20. Also, I added in the following event procedure to the module:
Application.Quit acSaveYes

So, the full module is this:
Sub IdleTimeDetected (ExpiredMinutes)
Dim Msg As String
Msg = "No user activity detected in the last "
Msg = Msg & ExpiredMinutes & " minutes. Access will now save and exit."
MsgBox Msg, 48
Application.Quit acSaveYes
End Sub

Currently, after 20 minutes of idle time, a user gets a message stating that they have been idle for 20 minutes and Access will save and exit. They can only click OK and be logged out. I have been asked to modify the procedure in two ways. One, when the msgbox appears, they want to be able to have an option to either exit or stay logged in, so a Yes No option. Also, if no response is given to the message within 5 minutes, then I'd like Access to automatically exit.

Any assistance is greatly appreciated!!!!
 
From my experience the msgbox command seems to halt execution of code until a user response is given. You might be better off using some customised forms with no borders etc, that look like msg boxes. Then the second form could have its own timer property set.

Just a thought
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top