i have a combobox that have items form database. the problem is when i selected an item from that combobox it disappeared but still in the choices. i want the combobox.selecteditem should be appearing if i selected it.
here's my code :
Dim strsql = "select * from DesignationEveryDept where Department = '" & DeptNameCB.Text & "'" Dim acscmd As New OleDb.OleDbCommand acscmd.CommandText = strsql acscmd.Connection = asconn acsdr = acscmd.ExecuteReader() DesEmpCB.Items.Clear() While (acsdr.Read()) DesEmpCB.Items.Add(acsdr("Designation")) End While acscmd.Dispose() acsdr.Close()
kindly help me. thank you in advance~