Hi Erik,
Oh, I know it's by design, that's why I call it a "gotcha". It's just counterintuitive when it happens.
I don't always use the IN clause on replace. It "feels" redundent when specifying the alias.field means of addressing what is to be replaced.
>Believe it or not, though annoying, this is one of those that qualifies as "By design"
>
>A REPLACE statement takes two optional clauses: a FOR clause, and an IN clause.
>
>If you leave out the IN clause, the replace assumes it is working on the current alias. If you leave out the FOR clause, the replace assumes it shall execute the command once for the current record in the current alias (as opposed to once for every record in the current alias that meets the specified condition). So, if you leave out the IN clause, VFP operates on the current table, and if the current table does not have a current record (EOF()), the command will not execute.
>
>Call it a bug if you will, but this "bug" won't ever be fixed.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05