All these years and still so much to learn!
replace stuff with otherstuff in mytable record cur.myrecnum
With, as you said, all the different ways you can do things, I never realized that < scope > could apply to a table outside the current work area.
>>I don't know why the following would work where your code doesn't, but alternate techniques sometimes work for no apparant reason
>>
>>SELECT myTable
>>lcOrder = TAG()
>>SET ORDER TO
>>
>>SELECT RECNO() AS MyRecnum,Field1,Field2 FROM MyTable INTO CURSOR cur READWRITE
>>
>>Do stuff with Cur
>>
>>SELECT cur
>** >SET RELATION TO myRecnum INTO myTable
>>SCAN FOR Condition met
>** > SELECT myTable
>**> Update Stuff IN myTable
>** how about
> replace stuff with otherstuff in mytable record cur.myrecnum
>>ENDSCAN
>>
>>SELECT cur
>>SET RELATION TO
>>SELECT myTable
>>SET ORDER TO (lcOrder)
>
>Note that I've commented out the relation as well.
>We can play like this because we can write into a record in several ways - replace, update, gather, insert, and we can navigate to it also in several ways - scope clause (record n, all, rest, next n), for/while clause, where clause in sql update, by index (seek command, seek function, indexseek, keymatch), using locate... and all of this with a filter or not, under influence of a filtered index or not... so, any of these can be written in about twenty ways (three is the minimum - if it can't be done in Fox at least three ways, it's not worth doing).