Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Last and first record in a filter???
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00165800
Message ID:
00165825
Vues:
19
It will still work. The only thing I left out is that you'll need to have an index order set in order to use the technique of switching the order to descending and issuing a LOCATE to find the last record. I should also mention that if you're already ordering descending you should set the order to ASCENDING then use LOCATE to find the "last" record.

>Josh,
>
>My table is filtered by date. The filters are set according to DATE(). Due, late, all. Can that little function still work?
>
>>Perry,
>>
>>One thing I've done in the past is to figure out the first and last records in advance. I have a little program or method to do this and I call it each time I need to refresh those values.
>>
>>Because GO TOP and GO BOTTOM aren't optimized, I usually use LOCATE (with no parameters) to find the first record. You can then set the index order DESCENDING and use LOCATE again to get the last record (the first record of the descending index). Then I set the order back and go to the record number I saved before I started any of this. It seems like a lot to do, but it all happens very fast as long as your filter expression is optimizable.
>>
>>
>>>Hi all,
>>>
>>>I have a buttonset that doesn't refresh properly when the filters are used. Is there a function I can use to manage the buttons?? Something like Recno() or reccount() but more accurate for a filtered table.
>>>
>>>TIA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform