Hi all,
Can someone tell me how I can get the number of records holded in the
recordset from with in VBA?
Something as:- intMax = me.recordcount
Thx,
Ludovic

Signature
-------------------------------
This e-nonsense has been sent using a Strawberry.
-------------------------------
Al Campagna - 14 May 2008 14:14 GMT
Vsn,
On my website (below), I have a sample 97 and 2003 file
called Record Statistics.
It shows how to display all the info you want about the
current recordset... whether filtered or not.
Records = 1 of 250 of 250
would indicate that this is record 1 of 250 of 250
If I filter out 50 records, it then displays...
Records = 1 of 200 of 250

Signature
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html
"Find a job that you love... and you'll never work a day in your life."
> Hi all,
>
[quoted text clipped - 5 lines]
> Thx,
> Ludovic
John W. Vinson - 14 May 2008 17:56 GMT
>Hi all,
>
[quoted text clipped - 5 lines]
>Thx,
>Ludovic
Me.RecordSetClone.RecordCount
should do it for you...

Signature
John W. Vinson [MVP]
David W. Fenton - 15 May 2008 02:33 GMT
>>Hi all,
>>
[quoted text clipped - 9 lines]
>
> should do it for you...
Well, except when it doesn't -- if checked during the form's OnLoad
event, it won't be accurate at first (for the same reason that no
recordset's recordcount can ever be counted on to be accurate) --
you need a:
Me.RecordSetClone.MoveLast
for the .RecordCount to be accurate.

Signature
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/