Thanya,
Several ways:
select view1
scan for field1 = THISFORM.txtText1.Value
replace field2 with THISFORM.txtText2.Value
endfor
or
replace field2 with THISFORM.txtText2.Value for field1 = THISFORM.txtText1.Value in view1
or
update view1 set field2 = THISFORM.txtText2.Value where field1 = THISFORM.txtText1.Value
HTH.
>Hi all,
> I tried this coding to update a field on my view:
>***
>scan
> if lookup(view1.field1, thisform.txtText1.value,;
> view1.field1) = thisform.txtText1.value
> replace view1.field2 with thisform.txtText2.value
> endif
>endscan
>***
> The problem I have is only 1 record(on the view) got updated. I would like to update all records on the view that match the condition I gave(= thisform.txtText1.value). I don't know how to have this coding inside a loop so it could be executed as many times as there are records in the view.
> Please help me, any ideas, suggestions or advice would be great help!
> Thanks.
> Thanya.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao