Turn off warning message

  • Thread starter Thread starter Rob S. 17407
  • Start date Start date
R

Rob S. 17407

I am running update queries. Each time I run a querie, Access informs me
that the querie will modify the table and asks if this is OK. After running
the query, it then tells me that I will be modifying XX records and asks if
that's OK.

Since I am hoping to run a long query that would require me to respond to
hundreds of such prompts, is there some way that I can turn off these
prompts/warning messages so that I can leave my desk while the macro
continues to run?

Thanks.
 
Rob said:
is there some way that I can turn off these
prompts/warning messages so that I can leave my desk while the macro
continues to run?

From the menu, Tools | Options | Edit/Find. Uncheck "Record Changes"
and "Action Queries" in the "Confirm" section of the window. Click on
the "OK" button to save your changes.
 
If you are running the queries via vba code (docmd.openquery or the
equivilant.) then before the first query add the following:

docmd.setwarnings false

Then add another line after all the queries have been run that sets it
back on.

docmd.setwarnings true

Ron
 
Ron2006 said:
If you are running the queries via vba code (docmd.openquery or the
equivilant.) then before the first query add the following:

docmd.setwarnings false

Then add another line after all the queries have been run that sets it
back on.

docmd.setwarnings true

As has been noted elsewhere, this can be problematic if an error occurs and
an error handling routine is invoked. The error handler must also handle
"setwarnings".

Keith.
www.keithwilby.co.uk
 
Back
Top