ineedyourhelp
MIS
I am looking to duplicate the "Record x of y" label that appears in the standard Navigation toolbar?
I am well aware that there are other threads relating to this issue, but I have not been able to get any of them to work. The code that I found (below) seemed to be the most logical, but I am still getting an error. Any ideas why?
A)Given that you have a label on the form called lblNavigate, put this code in the form's OnCurrent Event.
'************** Code Start **************
Private Sub Form_Current()
If Me.NewRecord Then
Me!lblNavigate.Caption = "New Record"
Else
With Me.RecordsetClone
.Bookmark = Me.Bookmark
Me!lblNavigate.Caption = "Record " & _
.CurrentRecord _
& " of " & .RecordCount
End With
End If
End Sub
************** Code End **************
I am well aware that there are other threads relating to this issue, but I have not been able to get any of them to work. The code that I found (below) seemed to be the most logical, but I am still getting an error. Any ideas why?
A)Given that you have a label on the form called lblNavigate, put this code in the form's OnCurrent Event.
'************** Code Start **************
Private Sub Form_Current()
If Me.NewRecord Then
Me!lblNavigate.Caption = "New Record"
Else
With Me.RecordsetClone
.Bookmark = Me.Bookmark
Me!lblNavigate.Caption = "Record " & _
.CurrentRecord _
& " of " & .RecordCount
End With
End If
End Sub
************** Code End **************