G
Guest
Greets,
I have a question I have combo box that gets a column in a dataset when I change the combo box
the dataset changes and that works well. The problem is the fields on the from that correspond to
the Combo Box don't Change and I get an error " An unhandled exception of type 'System.NullReferenceException' Occurred
in system.data.dll what am I doing wrong.
Code:
Private Sub frmNoTab_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
SqlDataAdapter1.Fill(DataSetElements1, "Elements")
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
DataSetElements1.Clear()
SqlDataAdapter1.Fill(DataSetElements1, "Elements")
End Sub
TIA
I have a question I have combo box that gets a column in a dataset when I change the combo box
the dataset changes and that works well. The problem is the fields on the from that correspond to
the Combo Box don't Change and I get an error " An unhandled exception of type 'System.NullReferenceException' Occurred
in system.data.dll what am I doing wrong.
Code:
Private Sub frmNoTab_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
SqlDataAdapter1.Fill(DataSetElements1, "Elements")
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
DataSetElements1.Clear()
SqlDataAdapter1.Fill(DataSetElements1, "Elements")
End Sub
TIA