"Random" problems with RecordsetClone.RecordCount

  • Thread starter Thread starter Laurel
  • Start date Start date
L

Laurel

Sometimes this line of code - "liX = Me.RecordsetClone.RecordCount" results
in the wrong value. That is liX is obviously not the same value as the
number of records in the form. My problem is that I can't find the pattern
that causes it to happen. Is there possibly a timing problem with
RecordCount? I have noticed that the count of records displayed at the
bottom of the form is sometimes slow to display.
 
I'm not sure if it helps or not, I was using .record cound to count records in a table and it was returning a wrong # of records. After I Compact & Repaired db it was fine.

HTH

Sally
 
Hi Laurel,

The simplest way to ensure an accurate recordcount from a recordset is
to do .MoveLast before the .RecordCount.
 
Back
Top