I use a process to do this that is fairly easy. One must really consider the implications if the form can call other forms. You do not want to close a process if another form has been opened. You can use the MDI form properties however to control this situation as well.
What I do is create a custom form action that sets a variable to the system time. Set var vProcessStartTime = .#time At the start of each EEP in your form, you need to call this form action so that the variable will be updated with the current time whenever the EEP is executed. In your form timer, compare vProcessStartTime to the current time. If you want to close the form after 15 minutes of inactivity for example, then If (.#Time - .vProcessStartTime) > 900 then .... do whatever checking needed Exit Endif Return I have the form timer set to run every 60 seconds to check the status. Everytime you execute an EEP the form action will run and set the variable to a new time. The form timer will run every minute and if the time difference is less than 15 minutes nothing happens. If greater than 15 minutes, you can perform various check operations and close the form. I do not recommend using a While statement for this application as it will consume a lot of CPU time. The form timer does not consume hardly any. -Bob ----- Original Message ----- From: Jim Belisle To: RBASE-L Mailing List Sent: Saturday, July 25, 2009 9:54 AM Subject: [RBASE-L] - TIMER I understand the TIMER function in a form. What I want to do is make it so the main form used by the sales and shop personnel will close after a set amount of time IF the form has not been used. My goal is to make sure it does not close while they are using it. I understand I will use either an IF THEN statement or WHILE loop but what would the proper syntax be for this function? The form name is KayParkMainMenu. Jim ------------------------------------------------------------------------------ No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.28/2259 - Release Date: 07/24/09 18:24:00

