Using recordset.recordcout

A

alvin Kuiper

Hi!
I have in my form current event this:
lbl1.Caption = Me.Recordset.RecordCount

Its working allright but first after i have clixk to record number 2, when
the form is open i get the value 1 record ???

regards
alvin
 
R

ruralguy via AccessMonster.com

The RecordCount is not guaranteed accurate until you have done a MoveLast!
So your code should be:

Me.RecordSetClone.MoveLast
Me.lbl1.Caption = Me.RecordSet.RecordCount
 
B

Barry Gilbert

Or maybe:

Me.RecordSetClone.MoveLast
Me.lbl1.Caption = Me.RecordSetClone.RecordCount

Barry
 
Top