>>Count command moves the record pointer. SQL select doesn't.
>
>IF eof ()
>exit
>endif
>
?
That would work. Not too elegant, though - exit means you're exiting a loop, so why not make a loop which knows when to exit? Scan/endscan is one such loop, it automatically exits on eof() and runs once per visible record in the given scope (and I think you'll love the scopes - check "scope clauses", "for clauses" and "while clauses" in help, then look at the bottom at the number of commands which have them... which is altogether the nice thing about Fox, how you can combine them at will).
So, time to rethink what you're doing. Why do you have a for-next loop, and can it be done with a different loop? Maybe you don't need a loop at all; if you're showing multiple records, maybe you could use a grid?