If you did this, you would have to save your record pointer position before the REPLACE...FOR... command and go back to it after the command. Otherwise, the first REPLACE will leave the record pointer at the EOF.
Also, the WHILE clause is probably better than the FOR clause. The FOR clause will cause the REPLACE to scan through the entire table which may take a lot of time, depending on the size of the table. WHILE can be used if the table is sorted by orderno. If WHILE is used, the skip -1 will be necessary because the REPLACE will leave the record pointer at the record past the last record that satisfies the WHILE condition.
Of course, maybe Roelaux only wanted to REPLACE for the current record. In this case, no WHILE or FOR clause should be used.
Take care,
Joe
>If I understand what you are doing, wouldn't this work?
>
>
>select orderfl
>Scan for lines=1and Catkey="CON"
> Replace invfl.hold with .T. for invfl.orderno = orderfl.orderno
> Wait window;
> "Replaced Hold with True as Requested for Customer # "+Cusnum;
> at 15,115 timeout 0.75
>Endscan
Joseph C. Kempel
Systems Analyst/Programmer
JNC