Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
COUNT number of records returned by SET FILTER
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00043256
Message ID:
00043338
Vues:
57
>>>I user a search dialog box that appears to return the user to the data entry form with a subset of the tables records based on a SET FILTER command. My data entry form indicates the record number the user is on as well as how many records their are. After they are returned to the form with the set filter results, the record numbers are all wrong. I need to get a count of the number of records the set filter returned.
>>>
>>>Jeff
>>
>>After you SET FILTER, you can use COUNT TO nRecords to return how many records you filtered.
>
>Hi Edward,
>
>Thanks for the response! But it looks like I need to do more than just get a count of the number of records returned by set filter. My data entry form includes standard navigational buttions (first, next, last, etc.) and a label indicating what record number is currently displayed and how many records their are. I use the following code to display this information: ALLTRIM(STR(RECNO()))+" of "+ALLTRIM(STR(RECCOUNT())). After the user does a search, only the subset of records are displayed, but the RECCOUNT still displays the total of all records in the table. Do you have any advice on how I can get my label to display only the total number of records in the subset as well as the current record displayed (of the subset)?
>
>Jeff

reccount will always return the total number of records in the table.
use
count to nRecords
like edward suggested to get the number matching the filter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform