Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Formatting of record numbers on form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01235737
Message ID:
01235752
Vues:
19
>I am having a weird results with the following code. It seems that what I see is coming out not the way I want it. Surprise, surprise, surprise.
>
>I have a label which shows which record number we are on and also out of how many record numbers; for example:
>
>
Record number 345 of 574
>
>In the above case, the result comes out mistakenly as:
>
>
Record number 3,5 of 5,4
>
>Why would this happen with the way I have set the code below?
>
>
>WITH ThisForm
>	IF EOF()
>		.lblRecCount.Caption = ;
>			"At End of File. " + ;
>			TRANSFORM(ALLTRIM(STR(RECCOUNT())), "9,999,999") + ;
>			" records."
>	ELSE
>		.lblRecCount.Caption = ;
>			"Record # " + ;
>			TRANSFORM(ALLTRIM(STR(RECNO())), "9,999,999") + ;
>			" of " + ;
>			TRANSFORM(ALLTRIM(STR(RECCOUNT())), "9,999,999") + ;
>			" records."
>	ENDIF
>	.Refresh()
>ENDWITH
>
You don't need the ALLTRIM(STR()) around the RECNO(). TRANSFORM() will handle that.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform