I have an Access 2010 form. It has several controls. One control is an exit control accessed by clicking a command box.
I have two data controls that if moved from while blank pop up a message box stating the user must enter something and then returning the focus to that control. The code uses the lost focus event to determine if the control is blank, then sets the timer interval to 1. The lost focus event handles the code to determine that the control is blank. If the contorl is blank the lost focus event sets the timer event to 1. The form timer then handles the message box to the user, resets the timer to 0 and returns the user to the blank control.
The exit control returns the user to the calling form.
The problem is that when the exit command box is clicked when either of the two controls that require a data entry have the focus and are blank the lost focus event occurs before the exit control has the focus. If either of these two controls have the focus and are empty when the exit command is clicked I need a way to not display the message and move on to the code in the exit box. In other words if the exit command is clicked I want to cancel the pop up message and exit the form without showing the message.
Is there a way to do this? I hope I am being clear.
Cuyler Smith