Automatically accepting YES in update query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am running a query through a macro/VB Code. Each time the query runs the
system asks if I want to update and I click on YES.

How can I force a yes or how do I stop the system asking the question.

Thanks inadvance for any help.
Graham
 
Use the set warnings to false

docmd.setwarnings false ' so it wont ask you
docmd.openquery "QueryName"
docmd.setwarnings true

But don't forget to set it back to true after you running the query
 
You can also use the Execute Method which won't ask for confirmation.

Check Access VB Help for the Execure Method (of DAO or ADO)
 
Back
Top