Delete command button in Access

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?
 
D

Dale Fye

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
 
M

Minton M

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
 
T

Toddmon

Will the code you provided removed the cancel comfirmation dialog box after I
cancelled the Delete?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top