>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)