Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help to stop error msg's when running action querys

Status
Not open for further replies.

kgreen

Technical User
Sep 11, 2000
32
0
0
GB
I am calling an action query, that moves records from one table to another, from a buttons OnClick event.

The query works fine but Access being Access throws up the standard error message.

I know that there is a way the the messages can be turned off while the query runs but I have forgotten how its done.

I am using the following:

DoComd.OpenQuery "QueryName"

Any help or suggestions

Kenny. [sig][/sig]
 
Hi Gang,

I forgot to mention I am using the DoCmd.SetWarnings True and false.

The thing I am looking for I think is something like

db.execute "Queryname"

But there is some other stuff that goes before it that stops the warning messages.

Thanks again,

Kenny




[sig][/sig]
 
If you are using code to run the query you can use:

docmd.setwarnings (True)

This will turn off Access warnings while the query runs if it is placed before the query is run.

K. Pereira
[sig][/sig]
 
actually setwarnings false before and setwarnings true after [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top