i have one table containing 2 columns namely Designation and Department.
i want from choosing on DeptnameCB the DesEmpCB will display the corressponding designation to the department chosen.
i have this code as of now.
Dim strsql = "select * from DesignationEveryDepartment where Department = '" & DeptNameCB.Text & "'" Dim acscmd As New OleDb.OleDbCommand acscmd.CommandText = strsql acscmd.Connection = asconn acsdr = acscmd.ExecuteReader() While (acsdr.Read()) DesEmpCB.Text = (acsdr("Designation")) End While acscmd.Dispose() acsdr.Close()
please help me. :)