G
Guest
Hi everyone, i'm pretty much stuck at this problem. I have 3 comboboxes and
the selected value in combobox1 will determine the value to display for
combobox2 and the selected value in combobox2 will determine the value
display in combobox3. The problem is that i am able to get the value to
display for combobox2 but i can't get the values to display for combobox3.
Below are my codes. can anyone help?
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Dim ds1 As New DataSet
ds1 = methods.SelectWard(ComboBox1.Text)
ComboBox2.ValueMember = "WARD"
ComboBox2.DisplayMember = "WARD"
ComboBox2.DataSource = ds1.Tables("WARD")
ComboBox2.Visible = True
End Sub
Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ComboBox2.SelectedIndexChanged
Dim ds As New DataSet
ds = methods.SelectBed(ComboBox2.Text)
ComboBox3.ValueMember = "BED_NO"
ComboBox3.DisplayMember = "BED_NO"
ComboBox3.DataSource = ds.Tables("BED")
ComboBox3.Visible = True
End Sub
the selected value in combobox1 will determine the value to display for
combobox2 and the selected value in combobox2 will determine the value
display in combobox3. The problem is that i am able to get the value to
display for combobox2 but i can't get the values to display for combobox3.
Below are my codes. can anyone help?
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Dim ds1 As New DataSet
ds1 = methods.SelectWard(ComboBox1.Text)
ComboBox2.ValueMember = "WARD"
ComboBox2.DisplayMember = "WARD"
ComboBox2.DataSource = ds1.Tables("WARD")
ComboBox2.Visible = True
End Sub
Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ComboBox2.SelectedIndexChanged
Dim ds As New DataSet
ds = methods.SelectBed(ComboBox2.Text)
ComboBox3.ValueMember = "BED_NO"
ComboBox3.DisplayMember = "BED_NO"
ComboBox3.DataSource = ds.Tables("BED")
ComboBox3.Visible = True
End Sub