A central way to detect changes to recordcount

I can write code to display an accurate record count such as

record 15 of 350

or, as bob cusick has proposed in his How To posting

record 15 of 350 (16,000 in foundset)

but to keep it up to date i need to call this code from a LOT of places:
onFind
onPrev
onNext
onAdd
etc.

I’d like to see a better, more central way to handle this.

amcgilly:
I can write code to display an accurate record count such as

record 15 of 350

or, as bob cusick has proposed in his How To posting

record 15 of 350 (16,000 in foundset)

but to keep it up to date i need to call this code from a LOT of places:
onFind
onPrev
onNext
onAdd
etc.

I’d like to see a better, more central way to handle this.

I didn’t test if it can work in a calc field: maybe you can try.
Anyway, if you look around in the post regarding this subject, you’ll find a lot of reason why implementing this feature is NOT a good idea (one for all: you can manage tables with several millions of records: this calculation can be VERY expensive).

My two cents: I’m coming from FileMaker too and I can assure you this functionality is more a habit than a real need…:slight_smile:

What I was mainly after was a single event that I could watch for that signaled the user changing from one record to another, and I just remembered that the onRecordSelection event is just that, so problem solved.

amcgilly:
I can write code to display an accurate record count such as

record 15 of 350

or, as bob cusick has proposed in his How To posting

record 15 of 350 (16,000 in foundset)

but to keep it up to date i need to call this code from a LOT of places:
onFind
onPrev
onNext
onAdd
etc.

I’d like to see a better, more central way to handle this.

Try onRecordSelection it is triggered when a record is selected.