Skip Append Verify Question

D

DaveK

I have an insert query that runs fine, but I want it to quit asking me if it
is OK to add the records I have selected from another DB. When the query
finishes, it gives me the count of records that it is going to insert, then
asks if that is OK. I would like it to just do the insert. Is there any way
around this verification step?
 
O

Ofer

Use the setwarnings comand to set the warnings to false

Docmd.SetWarnings False
Insert Quert
Docmd.SetWarnings True

' Don't forget to set it back to true
 
D

DaveK

How do I do that when running a query from the interactive mode using the
open query menu option? To possibly complicate matters, the query is in an
Access project that is inserting into an SQL Server table. I don't see any
way to run set commands from the menu. Do I need to run a macro from VB
while in interactive mode?
 
J

John Spencer (MVP)

--Write a macro to turn it off and a second one to turn it on.

--Turn it off permanently - Tools:Options:Edit/Find Uncheck Confirm Action Queries

--(BEST) run the query from VBA code or build a macro to do it as you suggested.
 
D

DaveK

I found it - Tools/Options/Edit/Confirm check boxes for action queries and
record changes.

Thank you for your help, I plan it use it in VB later.
 
Top