MouseDown event on a combo

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

Guest

I have a form to display projects for a list of client. Client is shown as
combo box. The user can add new projects or change existing projects in that
form.

I want a warning message to be displayed when the user tries to change the
client for an existing project and then the user can decide whether he wants
to change the client or not. I have done this by adding code to the MouseDown
event of that combo for Client. But the prob is the warning message gets
displayed twice once when the user clicks on that combo and again when he
selects some new value for the client, how can I avoid displaying this
message twice or is there a better way to do it?

Thanks,
 
Don't use the MouseDown event. Use the BeforeUpdate event to ask the user to
confirm the change. If the user says "don't change", you can cancel the
event by setting the Cancel integer variable to True.
 
Ken said:
Don't use the MouseDown event. Use the BeforeUpdate event to ask the user to
confirm the change. If the user says "don't change", you can cancel the
event by setting the Cancel integer variable to True.

As user interface consultant I recommend you do not take action that a
user might want to cancel on mouse (button, key) down. The better way is
to do so only on mouse (&) up. The user may then back out of a sequence
by moving the mouse off the item (s)he pressed.
 
Back
Top