Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Formatting of record numbers on form
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01235737
Message ID:
01235753
Views:
18
>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 should use Transform(nNumber,'@R 9,999,999')
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform