I'm trying to link two list boxes. For example, in ListBox1 I have Balances, Centrifuges, and Mixers. Lets say when balances is selected, I want all of the models for balances to appear in ListBox2. All of my data is connected to an Access databse. Also Balances, Centrifuges, and Mixers are worksheets within a workbook and my models are column within balances, centrifuges, etc...

How do I link them

I'm a noob so use small words


Re: Visual Basic General Linking Two List Boxes


Ok well i start of by saying i know nothing about programming in databases but i made a program that did a simaler thing.

Ok well basically you need to creat an event to the 1st listbox sumthing like this.

Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged


If Not ListBox1.SelectedIndex = -1 Then

'Fill out the 2nd Listbox Here


End If

End Sub

To figure out what to populate in the second ListBox you can find the name of the selected item in the 1st listbox with