Unfortunately the keyword IN does not work in FoxPro 2.6, and the code had to be done in one line.
Ultimately I figured out that it replaces always only the first match in DataEntry. So I had to change the filters for each occurance in DataEntry to have always one record matched and that worked, although I find it strange that this was the case. But it was an interesting experience, I'm so glad I don't have to work with FPW2.6 anymore!
But thanks for all suggestions!
>Be aware that SET RELATION does not filter on parent key
>Just does an implicit Seek() when recno(parentTable) changes
>
>I would rather do this:
>
>REPLACE in DataEntry OtherField WITH 1 for DataEntry.EmpNumber = Navigation.EmpNumber
>
>
>>In a FoxPro 2.6 application, I need to replace fields by using a relation. I thought it should work, but it doesn't.
>>
>>
>>USE Navigation
>>SET FILTER TO MyField = 1
>>
>>USE Dataentry
>>SET FILTER TO MyField = 100
>>SET ORDER TO EmpNumber
>>
>>SELECT Navigation
>>SET RELATION TO EmpNumber INTO Dataentry
>>REPLACE ALL DataEntry.OtherField WITH 1
>>
>>
>>Strange thing, it does not have any effect. Maybe I'm missing something?
Christian Isberner
Software Consultant