suppress append query message

S

Steve

When I run an append query or make table query the system tells me that I
will add records and so on... is there any way to suppress these messages? thx
 
S

Steve Schapel

Steve,

If you are running these queries via a macro, you can put a
SetWarnings/No action before the OpenQuery action.

If you are doing it in a VBA procedure, similarly put a line of code
like this...
DoCmd.SetWarnings False
.... ahead of the code that runs the append or make-table, and in this
case you need to also put
DoCmd.SetWarnings False
afterwards.
 
O

Ofer

If you want to remove the messages for all queries, without using the set
warnings, then in the menu bar select
Tools > Options > Edit/Search (Tab) > Confirm Action Queries (remove the
selection)

But you have to know that it will never prompt with the message event when
you are using the queries dirrectly
==================================
if you don't want to use this method, then after you run the update query
you need to set the warnings back to true

Docmd.SetWarnings False
Docmd.OpenQuery "QueryName"
Docmd.SetWarnings True
 
S

Steve Schapel

Steve,

I should have also mentioned that if you use this method in your code...
CurrentDb.Execute "YourQuery"
.... then the action query confirmation messages do not happen.
 
S

Steve Schapel

Ofer said:
If you want to remove the messages for all queries, without using the set
warnings, then in the menu bar select
Tools > Options > Edit/Search (Tab) > Confirm Action Queries (remove the
selection)

I would not recommend this approach.
 
Top