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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

closing an inactive form

Status
Not open for further replies.

stuandwil

Technical User
Apr 16, 2004
24
GB
Is there a way to close an inactive form without running permissions/security. Basically if a person is not typing in a field, close the form after 5 minutes. If they are typing either wait and time again or close when typing finished.

Thanks
Stuart
 
I'm sure there are cleaner ways but...

Set the forms timer interval to whatever time from you desire. 5 minutes would be somewhere around 300,000.

In the On Timer event put code to close the form, something like DoCmd.Close.

In each text box, use the Keydown event to reset the timer interval (Me.TimerInterval = 300000).

On every button, use the Click event to reset the timer interval.

The MouseDown event could also be used to reset the timer interval.


Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top