I'm importing check data into an Access table from an ASCII text file. Once all the records are imported I am sorting them by Federal Reserve banking district and assigning sequential print sequence numbers like so:
I have another field into which I need to insert a repeating sequence of numbers from 1 to 250, restarting the sequence on each change of Fed district. Can anyone point me in the right direction on this?
Code:
With rs
.Open "SELECT FedDistrict, PrintSequence " & _
"From Checks " & _
"Where PrintBatch = " & intBatch & " " & _
"ORDER BY FedDistrict", cn, adOpenForwardOnly, adLockOptimistic
Do While Not .EOF
!PrintSequence = lngPrintSequence
lngPrintSequence = lngPrintSequence + 1
.MoveNext
Loop
.Close
End With