>This code is kind of 'asking for trouble' :)
>U can achieve much cleaner solution, by inserting new records into temporary cursor of the same structure while scaning original table and then simply dump them in after main scan is done.
>
>so code cld look something like this ;
>
>
>SELECT MyTable
>local aStru(1)
>afields(aStru)
>create cursor tmpTable from array aStru
>SELECT MyTable
>go top
>scan
> .
> scatter to laArray
> .
> do case
>
> case ...
> insert into tmpTable from array laArray
>
> case ...
>
> endcase
> .
>endscan
>.
<b>append from dbf("tMyTable")
>.
>
>
>
The bolded is the correction.
But if I understand well, the original problem was that the appended records weren't processed at all. That'd be better solved with what Sergey proposed, to save the current record's recno() before inserting, and GoTo it afterwards.