Getting rid of a message

  • Thread starter Thread starter pvp
  • Start date Start date
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.
 
You can turn warnings off

DoCmd.SetWarnings False

or you can try a different syntax

CurrentDb.Execute strSQL, dbFailOnError
 
Yes:

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