On the before enter edit move of the combo, I am checking a condition, questioning the user (via message bo) and when they respond no, setting e.cancel to true. The control then re-enters edit and loops through this code. The control is not in readonly mode. The user started to edit with the combo drop down.
How, where do I cancel and edit without going into this type of loop?
Further to the above, the e.cancel is not even being reached. the editor is re-firing the Before Enter Edit event BEFORE the messagebox dialog has been respnded. How is this possible? If you keep clicking through the messagebox, after about the 3rd or 4th click, the next line of code in the event is reached, but then the loop starts all over again.
What I want to do is: when the control is editable:
1. If the user starts to edit: prompt to warn that a change will do something
2. If the user selects cancel, keep the present value and allow moving to next field
3. Else allow edit
What is the best event to handle these common editing event steps?thanks
Showing a MessageBox inside BeforeEnterEditMode is not a good idea. The control enters edit mode when it gets focus, but the MessageBox will take focus away from the control, so it's bound to create confusion.