Right now I have a button on a form that deletes a record, and when I click on the button to delete, the default access message comes up saying, "You are about to delete 1 records. If you click yes, you won't be able to undo the delete operation..." and when I click no, it says "The DoMenuItem action was cancelled."
How can I change what those two messages say? I think I want to use MsgBox with VBYesNo, but I see any of that on the code the wizard added. How can I change the code so that
1) "You are about to delete 1 records..." to say "You are about to delete one athlete..." and
2) instead of "The DoMenuItem action was cancelled" I want to have "The athlete will not be deleted." to show instead
Any help would be greatly appreciated. Thanks in advance.
-Chris
Here is the default code that the wizard added:
Private Sub Command10_Click()
On Error GoTo Err_Command10_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_Command10_Click:
Exit Sub
Err_Command10_Click:
MsgBox Err.Description
Resume Exit_Command10_Click
End Sub
How can I change what those two messages say? I think I want to use MsgBox with VBYesNo, but I see any of that on the code the wizard added. How can I change the code so that
1) "You are about to delete 1 records..." to say "You are about to delete one athlete..." and
2) instead of "The DoMenuItem action was cancelled" I want to have "The athlete will not be deleted." to show instead
Any help would be greatly appreciated. Thanks in advance.
-Chris
Here is the default code that the wizard added:
Private Sub Command10_Click()
On Error GoTo Err_Command10_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_Command10_Click:
Exit Sub
Err_Command10_Click:
MsgBox Err.Description
Resume Exit_Command10_Click
End Sub