Any way to turn off messaging as the module runs?

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

Some queries that are called from VBA create tables,
delete records, etc.

Is there anyway to turn off these messages (while
answering "yes" to the info box question)?

Thank you
 
You can use:

DoCmd.SetWarnings False
<your code to run queries>
DoCmd.SetWarnings True

or, if your version of Access supports it:

CurrentDB.Execute <full sql string for your Action Query>, dbFailOnError


hth,
 
SetWarnings.

Better yet, use the Execute method instead of RunSql for your action
queries.
 
Back
Top