T
Tom K via AccessMonster.com
Hi,
Im using the code from "The Access Web"site. The code duplicates the
navigation buttons, "Duplicate Record X of Y". It works great, but when I
first open my form it only displays 1 of 1, even though there are many
records. It changes to what it should be as soon as I move to a different
record. Is there a way to have it display the correct number of records at
the form opening? Is there somthing I could add to the code? Could I move to
the last record and then to the first when I open the form, and how would I
do that? This is the code Im using:
Private Sub Form_Current()
If Me.NewRecord Then
Me!lblNavigate.Caption = "New Record"
Else
With Me.RecordsetClone
.Bookmark = Me.Bookmark
Me!lblNavigate.Caption = "Record " &_
& " of " & .RecordCount
End With
End If
End Sub
I also included a label on the form called lblNavigate. The code is found at
www.mvps.org/access.htm
Thanks,
tom
Im using the code from "The Access Web"site. The code duplicates the
navigation buttons, "Duplicate Record X of Y". It works great, but when I
first open my form it only displays 1 of 1, even though there are many
records. It changes to what it should be as soon as I move to a different
record. Is there a way to have it display the correct number of records at
the form opening? Is there somthing I could add to the code? Could I move to
the last record and then to the first when I open the form, and how would I
do that? This is the code Im using:
Private Sub Form_Current()
If Me.NewRecord Then
Me!lblNavigate.Caption = "New Record"
Else
With Me.RecordsetClone
.Bookmark = Me.Bookmark
Me!lblNavigate.Caption = "Record " &_
& " of " & .RecordCount
End With
End If
End Sub
I also included a label on the form called lblNavigate. The code is found at
www.mvps.org/access.htm
Thanks,
tom