Record Count

  • Thread starter Thread starter Roger
  • Start date Start date
R

Roger

Is there a simple way of displaying a table's total
record count in a text box like is done with the default
navigation buttons display?

Thanks
 
try the following, as

Private Sub Form_Load()

Me.RecordsetClone.MoveLast
Me!txtMyTextbox = Me.RecordsetClone.RecordCount

End Sub

you can also use a label control instead of a textbox, as

Me!lblMyLabel.Caption = Me.RecordsetClone.RecordCount

hth
 
Another way:
Put the following expression in the control source property of an unbound
textbox:
=DCount("*","NameOfTable")
 
Back
Top