G
Guest
Hello!
On my subform I have my own navigation buttons (created using the command
button wizard). Currently, my subform is set so that the Access nagivation
buttons are still visible (the buttons that say "Record: 1 of 6 (Filtered)",
etc). The mainform is filtered so that it shows all the records in the
subform associated with the record on the mainform.
When I open the form, I can see from the Access navigation buttsons that I'm
looking at record 1 of 6 and if I wanted to scroll through the records, I can
using the other navigation buttons (they're enabled). If I click my own
navigation button (cmdNext) I get the message "You can't go to the specified
record". Only if I click the Access navigation button to scroll to, say the
second record, do my own navigation buttons work properly.
Why do I need to click the Access navigation buttons first before my own
navigation buttons work?
My code is nothing special...
"Private Sub cmdNext_Click()
On Error GoTo Err_cmdNext_Click
DoCmd.GoToRecord , , acNext
Exit_cmdNext_Click:
Exit Sub
Err_cmdNext_Click:
MsgBox Err.Description
Resume Exit_cmdNext_Click
End Sub"
Thanks in advance.
On my subform I have my own navigation buttons (created using the command
button wizard). Currently, my subform is set so that the Access nagivation
buttons are still visible (the buttons that say "Record: 1 of 6 (Filtered)",
etc). The mainform is filtered so that it shows all the records in the
subform associated with the record on the mainform.
When I open the form, I can see from the Access navigation buttsons that I'm
looking at record 1 of 6 and if I wanted to scroll through the records, I can
using the other navigation buttons (they're enabled). If I click my own
navigation button (cmdNext) I get the message "You can't go to the specified
record". Only if I click the Access navigation button to scroll to, say the
second record, do my own navigation buttons work properly.
Why do I need to click the Access navigation buttons first before my own
navigation buttons work?
My code is nothing special...
"Private Sub cmdNext_Click()
On Error GoTo Err_cmdNext_Click
DoCmd.GoToRecord , , acNext
Exit_cmdNext_Click:
Exit Sub
Err_cmdNext_Click:
MsgBox Err.Description
Resume Exit_cmdNext_Click
End Sub"
Thanks in advance.