Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update View, Help me!
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00362018
Message ID:
00362024
Views:
19
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.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform