Close button behavior

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Whenever a user has the cursor in a data input control that has code for the On Exit event, if they then click on the Close button in the control box it always executes the On Exit code of the control before closing. In fact, it executes it twice before the form will close. Is there a way to prevent this from happening? In other words, is there a way to use the Close button as a clean abort of data entry regardless of where the user has the cursor

ctda
 
No. The control's KeyUp, Change, BeforeUpdate, AfterUpdate, Exit, and
LostFocus events will fire before focus moves elsewhere.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

ctdak said:
Whenever a user has the cursor in a data input control that has code for
the On Exit event, if they then click on the Close button in the control box
it always executes the On Exit code of the control before closing. In fact,
it executes it twice before the form will close. Is there a way to prevent
this from happening? In other words, is there a way to use the Close button
as a clean abort of data entry regardless of where the user has the cursor?
 
Back
Top