>>I've been wondering this for a while: Is there an accurate way to determine how many records are in a filtered table? RecCount() doesnt' work, it's not affected by filters. _TALLY doesn't work, Filters aren't an SQL command. (or at least Set Filter To isn't).
>>
>>What am I missing? Surely you don't have to select it to a cursor to find out how many were returned?
>>
>>TIA!
>
>* Set your filter somewhere
>set filter to docnumber = 'ADL'
>locate
>
>* What is filter to get count
>lcfilter = SET('filter')
>count for &lcfilter to lnHowManyFilteredRecordsAreThere
You don't need to use condition here. COUNT respects it by itself.
If it's not broken, fix it until it is.
My Blog