Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy fields
Message
 
 
To
28/11/2004 18:44:46
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00965005
Message ID:
00965280
Views:
11
The SCAN...ENDSCAN loop is better.
SCAN FOR custno=ncustno  
...
ENDSCAN
Makes code simplier and faster (with appropriate indexes in place).

>To copy more that one record with conditon :
>
>clos data
>sele 0
>USE xldata
>sele 0
>use nan
>delete all && or zap if file is used exclusive
>sele xldata
>nCustno=thisfrom.text1.value && conditional to custno field on the form (numeric)
>go top
>do whil not eof()
>   if custno=ncustno  && append only in custno is = nCustno
>      scatter to mxx
>      sele nan
>      append blank
>      gather from mxx
>      sele xldata
>   endif
>   sele xldata
>   skip
>enddo
>clos data
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform