Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VB6 Combo box events

I have a form in VB6 with two combo boxes (cboCustomer and cboItemNumber). When someone selects a value from cboCustomer, I want to populate cboItemNumber with a list of item numbers relevent to the customer selected. What event does VB6 offer that I can use? I've tried _Change and _LostFocus and neither are doing what I need. I find it hard to believe that I'm having such a difficult time finding a list of possible events.

like image 887
Ryan Rodemoyer Avatar asked Nov 12 '08 20:11

Ryan Rodemoyer


2 Answers

Try the _Click event. This event fires even if the control is't actually clicked on. For example, if you tab in to it and use the up/down arrow keys to change the selected item, the click event still fires.

like image 190
George Mastros Avatar answered Sep 20 '22 17:09

George Mastros


As G Mastros says, the _Click event is the one to use, since it fires when the selection is changed via either keyboard or mouse.

If you want to see a list of all the events, then use the Object Browser (F2), and search for or browse to ComboBox. Events are shown with yellow lightning bolts in the Members pane.

like image 44
Ant Avatar answered Sep 17 '22 17:09

Ant