Question Help With A Code For ComboBox & ListBox

Dastard

New member
Joined
Sep 18, 2019
Messages
1
Programming Experience
Beginner
i made a ComboBox with Primary, Junior & Superior what i need help with is code for if i select Primary in ComboBox it will select ListBox1 if i select Junior in ComboBox it will select ListBox2 and Superior in ComboBox it will select ListBox3
Annotation_2019-09-18_083335.png
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,132
Location
Sydney, Australia
Programming Experience
10+
Detecting that an item has been selected in a ComboBox and which item it is will be the same no matter what you want to do about it. Populating a ListBox with items will be the same no matter when you want to do it. Two simple problems to solve and then just put the solutions together.

That said, if the data is coming from related tables in a database, you could just set up parent/child data-binding and the rest would happen automatically. We don't know whether that's applicable though, because you haven;t provided a FULL and CLEAR explanation of the problem, which would include where the items in the controls are coming from. If part of the problem is populating a ListBox, knowing where you're populating it from is part of the problem.
 
Top Bottom