How To Stop Vb Warning While Deleting A record

  • Thread starter Malik via AccessMonster.com
  • Start date
M

Malik via AccessMonster.com

Hi
I Have a Form With A delete Button And The Code is

DoCmd.RunCommand acCmdDeleteRecord

When Delete Button is pressed on , The Vb Confirm that with YeNo MsgBox.

How Can i stop its Confirmation MsgBox

Thanks.
 
L

Linq Adams via AccessMonster.com

DoCmd.SetWarnings False
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.SetWarnings True
 
A

Allen Browne

Are you sure you want to delete records without any warning? Even if many
records are deleted at once? And even if cascading deletes are wiping
records from other tables as well?

You can use the BeforeDelConfirm event procedure of the form to suppress the
message for one form.
 

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