...Thanks! But, why did it work? When OPTIMIZE is on VFP tries to be as fast as it can. As cursors normally are readonly, it can use a trick if the data is requestet in the same format as the source (i.e. no calculated fields, no grouping etc).
so if VFP finds a query like this:
select *;
from SOURCE;
where CUSTNO > "1234";
into cursor DEST_1
it actually does this:
select 0
use SOURCE again alias DEST_1
set filter to CUSTNO > "1234"
if it now would allow another ... INTO CURSOR DEST_1, You might ruin Your original data.
You can check by issuing
? dbf( "DEST_1" )
after the query.
So if You really need a cursor to further work with use the NOFILTER clause as the others said, to tell VFP "I do need this for furter work".