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
"Luis Marques" wrote:
> 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
|