SetWarnings False

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

Has anyone had this happen:

Code is:

If ianswer = 6 Then

DoCmd.SetWarnings False

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

DoCmd.SetWarnings True

End If

Code runs, but I still get the delete record message from
Access even though I am turning off warnings.

Thanks,
 
Steve

What happens if you insert a copy of the setwarnings between the two docmds?
(in addition to where you have it now)
 
Try

docmd.setwarnings 0 (for False)

and

docmd.setwarnings -1 (for True)

This will work.

Mitch
 
Back
Top