G
Guest
Hi everyone,
I am attempting to have a form auto-close either by tabbing through the last
field available on it, or by a button. I can get the button command to work
by using an onClick DoCmd.Close, however, if the user tabs through the
button, it opens a new record in the table it is linked to, which I do not
want it to do. Is there a way I can make the form close automatically once
the last field is tabbed through or prevent people from tabbing back to tab
stop 0?
When I remove the button, I have tried using the different options, such as
onExit, onChange and OnLostFocus, however, it either allows you to tab
through or I get a Runtime Error 2585 (Action cannot be carried out while
processing a form or report event)
With the button, I can get it to close the form with the click, but would
like to prevent the user from tabbing through this button.
Any help would be appreciated, thanks!
-gary
I am attempting to have a form auto-close either by tabbing through the last
field available on it, or by a button. I can get the button command to work
by using an onClick DoCmd.Close, however, if the user tabs through the
button, it opens a new record in the table it is linked to, which I do not
want it to do. Is there a way I can make the form close automatically once
the last field is tabbed through or prevent people from tabbing back to tab
stop 0?
When I remove the button, I have tried using the different options, such as
onExit, onChange and OnLostFocus, however, it either allows you to tab
through or I get a Runtime Error 2585 (Action cannot be carried out while
processing a form or report event)
With the button, I can get it to close the form with the click, but would
like to prevent the user from tabbing through this button.
Any help would be appreciated, thanks!
-gary