Roshan,
If you are doig this with a macro, add a SetWarnings action with
argument No before the first action query is run.
If you are using code to run SQL queries, use:
CurrentDb.Execute strSQL, dbFailOnError
instead of:
DoCmd.RunSQL strSQL
If you are running saved action queries from code with DoCmd.OpenQuery,
then add this:
DoCmd.SetWarning = False
before the firt one, and make sure to add this:
DoCmd.SetWarning = True
before the end of the sub/function.
Note: SetWarnings > No suppresses the warnings temporarily in a macro;
they are reset to default (warnings on) as soon as the macro finishes.
In code, on the contrary, DoCmd.SetWarning = False has a permanent
effect, therefore you need to restore the warnings before the end of
your procedure. If your code execution is interrupted before the
warnings are restored, they will remain suppressed until you close
Access. In such an event, open the immediate window (Ctrl+G) and type:
DoCmd.SetWarning = True
and press enter.
With the above in mind, because macros sometimes end up converted to
code, it is a good idea to add a SetWarnings > Yes at the end o the
macro, even though it makes no difference in the macro.
HTH,
Nikos