>Hi,
>
>I have the following few lines code:
>
>**********************************************************
>sele YearSls
>lcfind = lnYear + lnMonth
>if seek(lcFind)
> repl temp.Cur12Mo with temp.cur12Mo + sls.mosls && this works just fine
>else
> if lcKey = "S"
> sele temp && never had to do this before
> repl temp.Cur12Mo with 0 && doesn't work without line above
> endif
>endif
>**********************************************************
>
>Notice the line the 7th line down that reads repl temp.cur12mo with 0. The problem is that if I don't first preface that line with the line above it "sele temp" the replace will not work. In other words the field will not be zero but rather whatever it was before. It's as if the command is being ignored. I have never had this problem before.
In fact the first replace command in the above code (line 3) works great. >
>I realize I'm in another work area (YearSls) but I've always done this in the past where I simply reference the alias of the workarea I want to do the replacing in, if it's not the current work area and it's worked fine, or so I thought anyway. . . I just looked at the syntax of replace and I noticed the IN clause. I've never used that in the past.
>
>Is this a vfp bug or something?? really confused here... -Rick
It's not a bug it's a feature. :)
I personally always use IN clause
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison