help with loop code

  • Thread starter Thread starter Richard
  • Start date Start date
R

Richard

Hi

I have a query with 1000 records. I would like the code to go:

For 1-100

Do something.....

then from 101-200

do something

Question 1
Should I add a field with numbers for control or just sort the specific
field.

Question 3
How would I go about writing the loop code?

Thanks in advance
Richard
 
Richard said:
Hi

I have a query with 1000 records. I would like the code to go:

For 1-100

Do something.....

then from 101-200

do something

Question 1
Should I add a field with numbers for control or just sort the
specific field.

Question 3
How would I go about writing the loop code?

Thanks in advance
Richard

how bout something along the lines of:

i = 1
for i = 1 to 100
do something
i = i + 1
next i
 
Back
Top