Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Records filtered
Message
From
06/07/2006 22:38:16
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
06/07/2006 22:08:48
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Jet/Access Engine
Miscellaneous
Thread ID:
01134338
Message ID:
01134340
Views:
13
>Hi all,
>
>
>#DEFINE QUEST_LOC "Question "
>#DEFINE OF_LOC " of "
>THISFORM.lblCaption.Caption = QUEST_LOC + ALLTRIM(STR(filter1)) + ;
>	OF_LOC + ALLTRIM(STR(RECCOUNT()))
>
>
>I have label in a form named lblcaption where it displays a current record of the whole ones. The above code makes the lblcaption display
>Question 1 of 100.
>How to change this bit so that the display would be
>Question 1 of 20 of 100
>where 20 is the result of records filtered and 100 is the whole records.I read in VFP help that reccount is not effected by set filter so is there a way to solve it? How? Thank you.
>
>
>Regards

To get the number of filtered records, you must use the COUNT command. Either COUNT TO Variable, or use the special variable _tally.

You may need to remember the current record position, and go back.

For example:
local lnRecno
lnRecno = recno()
count
goto lnRecno
ThisForm.LblCaption.Caption = "Record " + trans(reccount) + " of " + trans(_tally)
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform