Q
QB
Hi I need to loop through a recordset, but in batch where I need to define a
start recordnumber and an end record number.
Basically, I have 32000, or so records, and I need to run code to loop
through the recordset 500 records at a time.
Click a button, run record 1 to 500
Change my code (start and end - could be pulled from a form control...)
Click a button, run record 501 to 1000
....
I started with the stardard code
iStart = 503
iEnd = 990
If rs.RecordCount > 0 Then
With rs
.MoveLast
iRecCount = .RecordCount
iCount = 0 + iStart
.Move iStart
Do While Not .EOF
iCount = iCount + 1
Status ("Processing Record: " & iCount & " of " & iRecCount)
.MoveNext
Loop
End With
End If
but now don't know how to mod the 'Do While Not .EOF' line. How do I check
which record I am currently accessing??
Thank you for the insight,
QB
start recordnumber and an end record number.
Basically, I have 32000, or so records, and I need to run code to loop
through the recordset 500 records at a time.
Click a button, run record 1 to 500
Change my code (start and end - could be pulled from a form control...)
Click a button, run record 501 to 1000
....
I started with the stardard code
iStart = 503
iEnd = 990
If rs.RecordCount > 0 Then
With rs
.MoveLast
iRecCount = .RecordCount
iCount = 0 + iStart
.Move iStart
Do While Not .EOF
iCount = iCount + 1
Status ("Processing Record: " & iCount & " of " & iRecCount)
.MoveNext
Loop
End With
End If
but now don't know how to mod the 'Do While Not .EOF' line. How do I check
which record I am currently accessing??
Thank you for the insight,
QB