Any way to turn off messaging as the module runs?

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
 
C

Cheryl Fischer

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

Allen Browne

SetWarnings.

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