I have two combobox in a form: Cb1 and Cb2
When I load the form, Cb1 and Cb2 are connected to a bindingsource.
When I change Cb1, the code (below) changes Cb2 to show only the items according to Cb1
This is working fine.
The problem is when I change Cb1 , change Cb2 and click the save button..... Cb2 seems to be 'lost'...
I'm using VS2008.
Thanks in advance!
Dim cnn As New OleDbConnection(stringConnect) Dim ds As New DataSet() Try cnn.Open() Dim da As New OleDbDataAdapter("select * from TabSub where CodSup=" & CLng(Cb1.SelectedValue), cnn) Me.Cb2.DisplayMember = "Descr" Me.Cb2.ValueMember = "CodeAcc" Me.Cb2.DataSource = ds.Tables(0) Me.Cb2.Refresh() Catch ex As Exception Throw New Exception(ex.Message) Finally cnn.Close() End Try