How to hide MsgBox when I run update query?

M

March

I try to hide the automated pop-up that it displays for user to comfirms
after run to update (insert, or delete) query?
 
K

Klatuu

Use SetWarnings

DoCmd.SetWarnings False
'Run your action query
DoCmd.SetWarnings True
 
D

Douglas J. Steele

Or, better in my opinion,

CurrentDb.QueryDefs("NameOfActionQuery").Execute dbFailOnError

That has the advantage that you can trap for any errors that might be raised
during running the query.
 
K

Klatuu

In that the Execute method goes directly to Jet, rather than through Access,
is it safe to Assume the standard Access Action Query warnings would not
appear?
 
D

Douglas J Steele

Yes, not having the Action Query warnings is the other advantage of using
the Execute method.
 
Top