You are getting the error because their is nothing in
0th index of the combobox, when you trying to set the index to 0.
To avoid this :
1. check whether the query returns value in all conditions since you are assigning
.ValueMember = "Department_ID" but you are not fetching the value for "Department_ID"in your query na?
2. make the following changes in your code:
Try
trSQL = "SELECT Department.Department_Name," & _
" Department.Department_ID " & _
" FROM Center INNER JOIN Division ON Center.Center_ID=" & _
" Division.Center_ID INNER JOIN Department ON " & _
" Division.Division_ID = Department.Division_ID " & _
" WHERE (Department.Dep_Status = 1) " & _
" Order BY Department_Name ASC "
daDB = New SqlClient.SqlDataAdapter(strSQL, conn)
daDB.Fill(dsDB, "Department")
With cmbDepartment
.DataSource = dsDB.Tables("Department")
.ValueMember = "Department_ID"
.DisplayMember = "Department_Name"
End With
If cmbDepartment.Items.Count > 0 Then
cmbDepartment.SelectedIndex=0
End If
Catch ex As Exception
MsgBox(ex.ToString)
End Try