Getting rid of a message

P

pvp

I use a doCmd.runSQL to do a delete query off a button on
my form. Is there any way I can stop the 'you are about
to delete ... records message' coming up as I do not need
to confirm deletion.

Thanks.
 
W

Wayne Morgan

You can turn warnings off

DoCmd.SetWarnings False

or you can try a different syntax

CurrentDb.Execute strSQL, dbFailOnError
 
J

jmonty

Yes:

Docmd.Setwarnings False
'Run your query here
'Docmd.runSQL "Delete * From tblCustomers"
Docmd.Setwarnings True
 

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