For Label
First you have to force Access to load the entire RecordSet, something the Access Gnomes don't always do when a Form first opens:
Code:
Private Sub Form_Load()
DoCmd.GoToRecord , , acLast
DoCmd.GoToRecord , , acFirst
End Sub
Then to update the count as you move from Record-to-Record:
For a Label
Code:
Private Sub Form_Current()
Me.LabelName.Caption = "Record " & CurrentRecord & " Of " & RecordsetClone.RecordCount & " Records"
End Sub
Actually, instead of using a separate Label and Me.LabelNameCaption, I usually use Me.Caption, which places the count in the very top of the Form itself, ala
Record 1 of 300 Records
If you also want a Form Name up there you could simply combine the two:
Me.Caption = "The Yada Yada Form " & "Record " & CurrentRecord & " Of " & RecordsetClone.RecordCount & " Records"
For Textbox
Code:
Private Sub Form_Current()
Me.TextboxName = "Record " & CurrentRecord & " Of " & RecordsetClone.RecordCount & " Records"
End Sub
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007