need help about binding combobox.. thx!

starfizz

New member
Joined
Aug 16, 2005
Messages
3
Programming Experience
Beginner
here's my problem,
i got 2 combobox
and 4 textboxes
and a button

basically, my idea is to get a choice from the user regardin 2 info, each from a combobox.. then, when the user click a button, the textboxes will display the info which is taken from the database based on the 2 combobox choices..

i have absolutely no idea on how to do this.. sorry.. i need help.. .thx a million!
 
Hey Starfizz,

Is the ComboBox Bound to a datasource? If so then you can set the ValueMember to a field from the db then Use ComboBox1.SelectedValueMember to figure out which item is selected and perform the necessary action. If you're populating the combobox yourself then you can remember the order you put the items in and use ComboBox1.SelectedIndex to work out which one has been selected.

Regards.
 
Back
Top