help with loop code

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
 
D

Damien McBain

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
 
R

Richard

Thanks Damien, will try it out.

Richard

Damien McBain said:
how bout something along the lines of:

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