I'm adding to a combo box an ID and a name that I'm pulling from a database. My problem is that for some reason my loop doesn't end once it reaches the end of the records in the database table. Here's my code:
For intcount = 0 To dtOrders.Rows.Count - 1
cmbSearch.Items.Add(dtOrders.Rows(intcount)("EmployeeID").ToString & " " &
dtOrders.Rows(intcount)("EmployeeLastName").ToString & ", " &
dtOrders.Rows(intcount)("EmployeeFirstName").ToString)
Next
Shouldn't the .rows.count - 1 stop it once it reaches the last record? It loops 4 times through.