DoCmd.SetWarnings doesn't work

R

Robbie

I have no problen using DoCmd.SetWarnings False to suppress warnings for the following kind of delete:
DoCmd.RunSQL ("DELETE FROM someTable WHERE ID = 5")

but not for this kind of delete:
DoCmd.RunCommand acCmdDeleteRecord

Is this normal? If so, how can I suppress warnings for the latter kind of delete?

Thanks in advance to all who deign to help!
 
D

Dirk Goldgar

Robbie said:
I have no problen using DoCmd.SetWarnings False to suppress warnings
for the following kind of delete: DoCmd.RunSQL ("DELETE FROM
someTable WHERE ID = 5")

but not for this kind of delete:
DoCmd.RunCommand acCmdDeleteRecord

Is this normal? If so, how can I suppress warnings for the latter
kind of delete?

Thanks in advance to all who deign to help!

It works fine for me:

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

Are you sure this is where the problem lies?
 

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