>select a_alias
>set order to tagname
>DO while not EOF()
>locate for field1 = variable and field2 = variable2
>nrecno = recno()
>If found()
>do some stuff
>Endif
>nrecno = nrecno + 1
>go nrecno in a_alias
>loop
James, Skip Moves the record pointer but you can use a scan and get a better result
SELECT a_alias
locate
scan for field1 = variable and field2 = variable2
endscan
The scan increments the counter without the skip.
HTH
What is Wisdom?
Wisdom - The ability to respond to any situation according to God's Plan.
Therefore:
USE Wisdom IN Everything ORDER priority AS Knowledge
SELECT Knowledge
BROWSE FOR Understanding WHERE Wisdom=Guide
LeRoy Jackson