Using recordset.recordcout

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
Or maybe:

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

Barry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top