Thank you for your help!!! I added an unbound text box and the code provided
to the OnCurrent event of the Microsoft Access form, as instructed. However,
I receive the following error and the code detailed below is highlighted.
I'm not sure what to do.
Complie error:
User-defined type not defined
Private Sub Form_Current() - HIGHLIGHTED
' Provide a record counter for using with
' custom navigation buttons (when not using
' Access built in navigation)
Dim rst As DAO.Recordset - HIGHLIGHTED
Dim lngCount As Long
Set rst = Me.RecordsetClone
With rst
.MoveFirst
.MoveLast
lngCount = .RecordCount
End With
'Show the result of the record count in the text box (txtRecordNo)
Me.txtRecordNo = "Record " & Me.CurrentRecord & " of " & lngCount
End Sub
I think this is what you're trying to do:
[quoted text clipped - 4 lines]
unable to display the current record and total records. Should I use a text
box?