>>Even with the for-next loop, you didn't need all the skip commands. You could have a "GO i" before the CASE, to the same effect - each iteration of the loop, you'd be on record i.
>
>bu-bu-but didnt i need the skip to jump to the next record?(which i suspect thats what scan does)
>Where does your I increment? the Next?
What i? :)
I'm using the recno() instead. And scan/endscan is an implicit go top - do while !eof() - skip - enddo loop (and it also restores the alias through which it's looping).
And generally, whenever you see a command in the responses here that you aren't exactly sure what it does, check it in help. Combination of examples and F1 help related to what you are doing will speed up your learning.