H
Haggr1 via AccessMonster.com
How do code an idle form (idle for mare than two minutes) to close and open
main form?
main form?
Well, one way to do it would be to have a date/time variable that you fill
each time someone does something on the form. Then the TIMER event could
simply check to see how long it's been between "now" and when the last
"thing" was done on the form. Once a certain interval had elapsed, the timer
event would simply close the form.
[quoted text clipped - 3 lines]Thanks, I tried that and that event closes the form even if it is not idle.
This the something to add to that event other than time incrimates?
Haggr1 via AccessMonster.com said:I think you are on the right track. but I would need help with code. At
form open focus is set to text."job number" then moves to date/ time text box
which default value =Now() then to text.amount then a marco "data entry".
so job number lost focus could start a timer event, daty entry could also.
Please "Show me the code"
Thanks
Well, one way to do it would be to have a date/time variable that you fill
each time someone does something on the form. Then the TIMER event could
simply check to see how long it's been between "now" and when the last
"thing" was done on the form. Once a certain interval had elapsed, the timer
event would simply close the form.
[quoted text clipped - 3 lines]Thanks, I tried that and that event closes the form even if it is not idle.
This the something to add to that event other than time incrimates?How do code an idle form (idle for mare than two minutes) to close and open
main form?
Realistically, ANY event could be used to reset the date/time variable.
Personally, I'd create a PUBLIC date/time var in a Module, then a PUBLIC SUB
in that same module to fill the value. Then I'd simply direct mutiple events
of my choosing on the form, to the PUBLIC SUB. All the ON TIMER event would
do would be to check the difference between NOW and THEN, and if the value
were long enough, the form would close.
From a coding standpoint, there's not much there. The bigger issue is for
you to determine what form/control events (clicking a button or a textbox ON
CHANGE event for example?) would trigger the reset of the public date/time
variable. Everything else would kind-of "auto-run," you know...?
[quoted text clipped - 16 lines]I think you are on the right track. but I would need help with code. At
form open focus is set to text."job number" then moves to date/ time text box