Answer "Yes" when delete a record

  • Thread starter Thread starter Luis Marques
  • Start date Start date
L

Luis Marques

I have the following code, to delete a record. But before access delete it,
needs a confirmation (yes/no).

What code do I need, to always answer yes?

DoCmd.DoMenuItem acFormBar, acEditMenu, acSelectRecord, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, acDelete, , acMenuVer70

Thanks in advance
 
The following will do it without the prompt

DoCmd.SetWarnings False
DoCmd.DoMenuItem acFormBar, acEditMenu, acSelectRecord, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, acDelete, , acMenuVer70
DoCmd.SetWarnings True
 
Back
Top