Delete command button in Access

  • Thread starter Thread starter Toddmon
  • Start date Start date
T

Toddmon

When I clicked Cancel on Delete dialog box, "Are you sure you want to delete
this record?", a Cancel dialog box appeared saying, "The DoMenuItem action
was canceled." How do I remove it, so it would not come up again when Cancel
button was clicked?
 
Todd,

What code are you running that causes the Delete dialog (I assume you are
deleting a record) to appear?

You should be able to do the following:

docmd.Setwarnings false
....
'your delete code here
....
docmd.setwarnings true

HTH
Dale
 
When I clicked Cancel on Delete dialog box, "Are you sure you want to delete
this record?", a Cancel dialog box appeared saying, "The DoMenuItem action
was canceled." How do I remove it, so it would not come up again when Cancel
button was clicked?

DoCmd.SetWarnings False will suppress any error messages, but it
depends on how you're calling the delete since you need to run this
prior to doing the delete.

Hope this helps,
James
 
Will the code you provided removed the cancel comfirmation dialog box after I
cancelled the Delete?
 
Back
Top