i have a form with a dropdown
i am populating dropdowmn from database but having few issues
i have a sub function fr populating the dropdown as
Dim da1 As New SqlDataAdapter(cmd1)
Dim ds1 As New DataSet()
da1.Fill(ds1, "M_customer")
Me.drpcust.DataSource = ds1
Me.drpcust.DisplayMember = "Cname"
Me.drpcust.ValueMember = "CID"
but after this line Me.drpcust.DataSource = ds1 the prg flow jumps to another sub function
having If drpcust.SelectedIndex = -1 Then
cmdsave.Enabled = False
Button1.Enabled = False
which shld not happen
and even he dropdown is not getting populated
i am populating dropdowmn from database but having few issues
i have a sub function fr populating the dropdown as
Dim da1 As New SqlDataAdapter(cmd1)
Dim ds1 As New DataSet()
da1.Fill(ds1, "M_customer")
Me.drpcust.DataSource = ds1
Me.drpcust.DisplayMember = "Cname"
Me.drpcust.ValueMember = "CID"
but after this line Me.drpcust.DataSource = ds1 the prg flow jumps to another sub function
having If drpcust.SelectedIndex = -1 Then
cmdsave.Enabled = False
Button1.Enabled = False
which shld not happen
and even he dropdown is not getting populated