By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,663 Members | 1,843 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,663 IT Pros & Developers. It's quick & easy.

More to Command Button

P: n/a
I'm a newbie to Access and programming.
I used the wizard to create a command button to go to next record on a
form.The following is the code:

Private Sub Command135_Click()
On Error GoTo Err_Command135_Click
DoCmd.GoToRecord , , acNext
Exit_Command135_Click:
Exit Sub
Err_Command135_Click:
MsgBox Err.Description
Resume Exit_Command135_Click

End Sub

The way it is right now the button just goes to the next record. I
want to be able to display a message" Do you want to go to next
record?" If user clicks yes then go to next record, If user click no
then stays on the same record.

Mar 3 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
fo*******@martecgroup.com wrote:
I'm a newbie to Access and programming.
I used the wizard to create a command button to go to next record on a
form.The following is the code:

Private Sub Command135_Click()
On Error GoTo Err_Command135_Click If msgbox("Go To Next Record?",vbQuestion + vbYesNo, "Confirm GO") =
vbYes then DoCmd.GoToRecord , , acNext
Exit_Command135_Click:
Exit Sub
Err_Command135_Click:
MsgBox Err.Description
Resume Exit_Command135_Click

End Sub

The way it is right now the button just goes to the next record. I
want to be able to display a message" Do you want to go to next
record?" If user clicks yes then go to next record, If user click no
then stays on the same record.

Mar 3 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.