Bob,
This form is a main form that is made up of a Group Bar (consisting of five groups with multiple selections in every group) and six Bit Buttons in another area. My shop people (and sometimes office people) have a tendency to leave this form open after hours which prevents me from doing any maintenance. What makes it more complicated is I am off site a lot and do most of this maintenance off site. I do not have administrator rights so I cannot log into their computers. This is why I want to use the timer for this form if possible. If I understand your suggestion correctly, I need to at least reset the vProcessStartTime each time one group button is opened and each time the bit buttons are used. I think this would work because the processes within the groups are simple operations such as printing reports. If I set the Timer function for at least one hour, I do not believe any operations would be interrupted. Now down to the nitty gritty. When you state I would need to call the form action for each EEP, would putting this statement "Set var vProcessStartTime = .#time", at the start of each EEP be sufficient? I am assuming the On After Start EEP would be: Set var vProcessStartTime = .#time RETURN And the Timer EEP would be: If (.#Time - .vProcessStartTime) > 900 then .... do whatever checking needed Exit Endif Return Does this look correct to you? Jim ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Bob Thompson Sent: Saturday, July 25, 2009 10:42 AM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: TIMER 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 <mailto:[email protected]> To: RBASE-L Mailing List <mailto:[email protected]> 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

