Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help on Locate Command
Message
De
03/10/2013 18:32:01
 
 
À
03/10/2013 14:03:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01584747
Message ID:
01584757
Vues:
48
>I am using Locate Command and if my desired text is found I am doing something, something.
>
>Here is my code
>
>
>If lshiftuppagetworecurringcharges=.T.
>LOCATE  For Strextract(ps,'(',')')='RecurringCharges' And PageNo=2
>If Found ()
>nrecurringchargesposr=posr
>Select Distinct posr From pagetwo Order By posr Desc Into Cursor distinctposr
>Locate For posr=nrecurringchargesposr
>Skip-1
>ncommondifferenceforrecurringchargesposr=posr-nrecurringchargesposr-10
>Select pagetwo
>Replace All posr With posr+ncommondifferenceforrecurringchargesposr For posr<=nrecurringchargesposr
>Endif
>Endif
>
>
>My problem is that if the first instance of my required text i.e 'RecurringCharges' in the above case is found True, my Code is executed. However I have many other records later in my cursor for which I have Strextract(ps,'(',')')='RecurringCharges' And the above code does not locates and executes all the 'RecurringCharges'
>
>I need that the Locate for should search till the last existence or occurrence of ‘RecurringCharges’ in my cursor and execute the code if the condition is found true.
>
>What changes I have to do in my above code.
>
>Regards
You might try something like
SCAN FOR Strextract(ps,'(',')')='RecurringCharges' And PageNo=2
     code
     code
     etc.

 ENDSCAN
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform