SetWarnings False

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,
 
J

Jeff Boyce

Steve

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

Guest

Try

docmd.setwarnings 0 (for False)

and

docmd.setwarnings -1 (for True)

This will work.

Mitch
 

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

Similar Threads

DoCmd.OpenForm 2
Delete warning 4
DoCmd.SetWarnings 1
Delete Record Command Button 3
IF Statement 5
How do you Copy a record on a Form 1
Delete record error 3
VBA - Add New Issue 1

Top