Close button behavior

C

ctdak

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
 
A

Allen Browne

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top