Count filtered records

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

Guest

Is there a way to determine the count of displayed records after a filter has
been applied to a form? This would be the number displayed at the bottom of
the form if the Navigation Buttons property is set to Yes.

Thanks in advance,
 
You could determine the count of records with this expression:
=[Form].[RecorsetClone].[RecordCount]

However, be aware that this shows the number of records Access has loaded
into the form. When you first load/filter the form, it grabs the first
record and shows it in screen, so the count will probably be 1. Eventually
the number gets updated. Or you can force the update in code by moving the
the last record:
With Me.RecorsetClone
If .RecordCount > 0 Then
.MoveLast
End If
End With
 
Back
Top