Depends on what you are doing. If you are executing some sort of action
query, then there are a couple of ways.
1. You can preceed and follow the code with statements turning the warning
off/on
Docmd.SetWarnings False
'some code here
Docmd.setWarnings True
2. You could use the Execute method to run the query. This bypasses the
warning messages and, unless you explicitly tell it to warn you if the action
fails, will not give you any indication regarding the success or failure of
the execution. I generally add the "dbFailOnError" option and provide some
error handling code so that I can identify errors that occur and handle them
properly.
Currentdb.Execute strSQL, dbFailOnError
HTH
Dale