Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Records filtered
Message
De
06/07/2006 22:38:16
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
06/07/2006 22:08:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Jet/Access Engine
Divers
Thread ID:
01134338
Message ID:
01134340
Vues:
14
>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)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform