Determining how a combo box got selected

  • Thread starter Thread starter Juan Galvez
  • Start date Start date
J

Juan Galvez

Hello everyone,

How can I determine whether a combo box got selectd from the user's exiting
the last control or by the user clicking on it directly? The GotFocus event
on the combo would be the ideal place, but it triggers before the MouseDown
event. I need to do a "mouse clicked?" check before the GotFocus event, not
afterwards. Since the previous control has the focus by default, using the
LeftFocus event on it doesn't work either because the click takes place on
the next control (the combo box)... help?

Thanks in advance,


Juan Galvez
 
Hi Mark,

The problem is that I need some actions to take place when the user clicks
on the combo instead of tabbing (or after updating) from the previous
control (an option group). The user will not necessarily be updating the
combo, so the AfterUpdate would not always be used. If the user gets to the
combo box from updating the option group (which precedes it in the tab
order), then the updates will have taken place. However, if the user jumps
directly to the combo by clicking on it with the mouse, I want a different
set of updates to take place. That's why I need to know how the user got to
the combo in the first place.

I thought about using the LostFocus or Exit events from the combo box, but
I'm in the same predicament: How do I know whether the user is moving
between controls by clicking when the click events take place when the focus
is inside the control already?
 
If you create a form level boolean variable and when the form loads set to
False. Then in the AfterUpdate Event of the Option Group set it to True.
Then you know if the user has updated the Option Group.

HTH
Mark.
 
Perfect. Thank you.

Juan

Mark Phillipson said:
If you create a form level boolean variable and when the form loads set to
False. Then in the AfterUpdate Event of the Option Group set it to True.
Then you know if the user has updated the Option Group.

HTH
Mark.

got
 
Back
Top