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.
+5
A:
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.
G Mastros
2008-11-12 21:02:38
Yes, that worked. How great it is to learn a new language :-/
rodey
2008-11-12 21:07:33
A:
It's been a while (thank god) since I've used VB6, but I believe the SelectedIndexChanged or TextChanged events will do what you want. http://msdn.microsoft.com/en-us/library/fte6kbt2(VS.80).aspx
John MacIntyre
2008-11-12 21:06:57
A:
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.
Ant
2008-11-13 09:32:45