> Sorry for the double post, I'm posting through
> Google Groups, and there must have been a
> problem with my first posting
If you are going to apologize, do so for not saying that RecordCount gives
you a total number of Records in the Recordset ONLY if you have done a
.MoveLast before displaying the RecordCount. It is a count of number of
Records that have been displayed/ traversed, not a "total".
Larry Linson
Microsoft Access MVP
Cyrille - 17 Feb 2006 22:04 GMT
My mistake, I posted too quickly. It's even indicated in the Help of
Access, so I have no excuses.
The strange thing is, it _seems_ to work. (Of course this can't
constitute a valid justification for using this method, but
nevertheless ...)
I had tested it in a few forms, without the .MoveLast, and the
returned value was always coherent with the number of records (as
indicated in the navigation bar at the bottom). I had tested some
Recordset-related actions, like creating a new record, or deleting one,
and still the value returned by RecordCount (without a prior .MoveLast)
is correct.
So why does RecordCount does report correct values even when all the
records have not been traversed ?
And in which specific circumstances does this method returns false
values ?
The .Movelast - .Recordcount method seems to have a significant
impact on the performance, so is there a quicker and smarter way to
implement a record count ?
--
Cyrille