Lapchien
asked on
Time out on form - automatically close a form if no activity
I have a load of users that leave an inputting screen open, rather than close it and return to the front form.
Is it possible (!) to have a timer running on the open form that checks to see if a certain field is null, say every 3 minutes, and if it is null will force that form to close - maybe even ignorning any errors that might occur as a result of forcing a form to close, such as part completing a record..? Not bothered about keeping changes to a part-completed record.
Thanks
Lapchien
Is it possible (!) to have a timer running on the open form that checks to see if a certain field is null, say every 3 minutes, and if it is null will force that form to close - maybe even ignorning any errors that might occur as a result of forcing a form to close, such as part completing a record..? Not bothered about keeping changes to a part-completed record.
Thanks
Lapchien
ASKER
yes - but what would the code be to check if a field is null, something like
if isnull (me.myfield) then
drop anything input on the form (don't know the code for this)
then
docmd.close
?
What is the timer interval for 3 minutes?
if isnull (me.myfield) then
drop anything input on the form (don't know the code for this)
then
docmd.close
?
What is the timer interval for 3 minutes?
actually, what i would do is first to save the record with the code Me.Refresh (and use an error handler with "resume next" to catch any errors), then close the form with this code
DoCmd.Close acForm, "MyForm", acSaveNo
(this ignores all design changes, if any were done; sometimes access thinks someone has changed the design even though this wasn't really the case, probably when filters are set or similar).
--bluelizard
DoCmd.Close acForm, "MyForm", acSaveNo
(this ignores all design changes, if any were done; sometimes access thinks someone has changed the design even though this wasn't really the case, probably when filters are set or similar).
--bluelizard
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
--bluelizard