Stop Delete Record Confirmation on Form

B

Bob

How can I shut off the confirmation for "Delete Record" operation. I
select the record in the form, click a command button that does a
delete record via an event procedure, and get a confirmation prompt
(action is the same as if you selected a record and then used edit->
delete record). Perhaps I need to return a value somewhere to
something ?

Code follows, TIA,

Private Sub Command35_Click()
On Error GoTo Err_Command35_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

Exit_Command35_Click:
Exit Sub
 
S

Someone

As follows:

Private Sub Command35_Click()
On Error GoTo Err_Command35_Click

DoCmd.SetWarnings False

DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

DoCmd.SetWarnings True

Exit_Command35_Click:
Exit Sub
 
B

Bob

As follows:

Private Sub Command35_Click()
On Error GoTo Err_Command35_Click

DoCmd.SetWarnings False

DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

DoCmd.SetWarnings True

Thanks
 

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