>Just in case ???
>Oh from your first message I assumed you were using it already.
When I open the file the order is set alright, maybe I have messed it somewhere along the code.
>In any case if you think WHILE is a problem simply use FOR instead. A FOR automatically rewinds to top, yes, but fox is clever enough to use index to find records for replacement with expressions like in your sample (I don't mean WHILE is a problem - whenever I saw WHILE fail it was my fault not Fox's).
Same I guess in my case, but the fun part is that it randomly fails.
>
>WHILE with ALL is likely to always fail. Suppose you have ids :
True
>If I remember correct in your original message m.id was char ? If so remember if set exact is off :
That is an idea maybe the replacement is being done but somewhere else and I guess exact is off
>PS: You can use FOR and WHILE together in the same command.
REPLACE dbf.fld WITH .T. FOR dbf.id = m.id (WHILE ???)