Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
VB
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
        Dim str As String

        str = "Select Datee From Schedules Where BusID = '" + ComboBox1.SelectedValue + "' "
        con.Open()

    End Sub



i am selecting value of busid from combobox1 and i want that changes should reflect in combobox2
according to busid i selected
Posted
Comments
DinoRondelly 22-Apr-13 14:13pm    
Ok what are you stuck on?
Polarfuze 22-Apr-13 14:17pm    
i dunno the code to make it happen

"i am selecting value of busid from combobox1 and i want that changes should reflect in combobox2
according to busid i selected"

1 solution

This will show you how to query the database,

http://social.msdn.microsoft.com/Forums/en-US/vbide/thread/e4344a25-93e5-40d4-a97d-c5ee0b573577/[^]

And this will show you how to bind the results to your combo box,

http://vb.net-informations.com/dataset/bind-combobox.htm[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900