>I quote from the VFP help file on the REPLACE command:
>
>if the record pointer is at the end of the file in the current
>work area and you specify a field in another work area.
>
>Huh? .... it's true...just try it...
>
>select table1
>replace table1.c with 'A'
>select table2
>locate for .F.
>replace table1.c with 'B'
>?table1.c
>go top
>replace table1.c with 'C'
>?table1.c
>locate for .F.
>replace table1.c with 'D' IN table1
>?table1.c
>Would anyone like to explain the origin of this FODU ('feature of dubious utility') to me?
>
>Let me guess - if you fall off the end of a parent table, VFP is preventing you from altering the related child ... well fine. Then only apply the rule when the two tables are related (or better yet ... just write into the void).
>
>I got nailed by this obscure feature and I feel very lucky to have discovered the fine print at the bottom of the REPLACE help before spending hours trying to figure out why the replace wasn't happening.
This "feature" has been around as long as xBASE. My understanding is it has never been fixed because some programs might actually rely on it working this way.
FWIW the IN clause makes managing this easier than it used to be.
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up