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)
 

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

Similar Threads


Back
Top