Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
COUNT number of records returned by SET FILTER
Message
From
07/08/1997 10:35:16
 
 
To
06/08/1997 18:29:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00043256
Message ID:
00043515
Views:
62
>>>>>>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
>>
>>Also, be careful enough to return record pointer back after RECCOUNT() either COUNT.
>
>Does RECCOUNT() move the record pointer?
>
>Vlad

Sorry, I have made a blunder here. UT is a really dangerous place... COUNT() will move a pointer, but RECCOUNT() not.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform