Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Find The Second & Subsequent Occurrence of Record
Message
De
04/04/2013 11:21:39
 
 
À
04/04/2013 10:02:37
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:
01570066
Message ID:
01570077
Vues:
45
And you're doing it again. Why do you insist on starting multiple threads for the same problem on the same day? It's annoying and will cause people to just start skipping over your name.

You need to check out the 'Continue' statement of the Locate.



>I have a DBF file Which has around 500 Records. I am trying to Find the Second and Subsequent occurrence of Word "U1" in the the records and insert One Record prior to 'U1' with some of my required Text.
>
>I am using the following code for this.
>
>
>		GO TOP
>		FOR I=1 TO NewHeaderpagecount && NewHeaderpagecount is Number of Pages For example 3 
>		LOCATE FOR ALLTRIM(PS)="U1" AND RECNO()>U1Recno
>		U1Recno=RECNO()
>		SKIP-1
>		INSERT Blank
>		Replace PS WITH "F12 B (Page No. &I)498 21 w" && Error is Here, It insert the after First occurrence of "U1" Only
>		ENDFOR
>
>
>The above code is inserting my required Text Just prior to First occurrence of "U1" only. While my requirement is that It Should Replace my required text from 2nd ocurrence of "U1" and subsequent U1 and First Occurrence should not be Disturbed.
>
>Also The in Text "F12 B (Page No. &I)498 21 w", the value of I is not coming as 1,2 ,3 ,it is coming as &I.
>
>Kindly resolve the Problem
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform