2 weeks on the job so far....
Im trying to debug print and skip in ck sequence.
the rs returns ordered ck #. im trying to debug print any missing ones, but my code seems so messy any sugestions on cleaning ALL of it and making it work??


M~


Dim frstCek As Integer
Dim nextCek As Integer
Dim i As Integer

i = InStr(RS(0).Value, "-") - 1
frstCek = CInt(Left(RS(0).Value, i))
RS.MoveNext

Do While Not RS.EOF


nextCek = CInt(Left(RS(0).Value, i))

If (nextCek - frstCek - 1) <> 0 Then
Debug.Print "FirstCK # " & frstCek & vbCrLf
Debug.Print "NextCK # " & nextCek
Else
frstCek = nextCek
End If
RS.MoveNext
Loop