Help! I just want to pan through my values in a combobox at the same time I'm adding them. If the last number = the current number, skip.
Query uses this logic:
If I could calculate a way to get distinct data of the left six characters, it would have been a lot easier. SELECT DISTINCT LEFT(JobNo, 6) produced nothing.
Thanks!
Query uses this logic:
Code:
sql = "SELECT LEFT(JobNo, 6) From [JobSheet].[dbo].[JobInfo] ORDER BY JobNo "
Code:
Dim cbocount As Integer = 1
Do While Not rs.EOF
Try
MessageBox.Show(cbocount)
MessageBox.Show(cboJob.Items(cbocount))
If cboJob.Items(cbocount) <> rs(0).Value Then
cboJob.Items.Add(rs(0).Value)
End If
Catch
End Try
cbocount = cbocount + 1
rs.MoveNext()
Loop