Turn off warning message

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.
 
G

Gigamite

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.
 
R

Ron2006

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
 
K

Keith Wilby

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top