Action Queries - Access Options

  • Thread starter Secret Squirrel
  • Start date
S

Secret Squirrel

In the Options section under Edit/Find is the option to shut off "Action
Queries". Is that option specific to the computer the database is opened on
or specific to the DB itself? I shut it off on my computer but it's still
checked on other computers when my DB is opened. Is there a way to shut this
off via a VBA function instead of going around to each computer to turn it
off manually?
 
A

Accessguru

The VBA code to do this is

DoCmd.SetWarnings False

But it is actually better to run the queries using

CurrentDB.Execute "QueryName", dbFailOnError

as it doesn't require you to turn off the warnings.
 
A

Arvin Meyer [MVP]

It is specific to the computer Access is running on. It does not prohibit
running Action Queries, but turns the warning off (could be dangerous).
Anyway the code is:

Application.SetOption "Confirm Action Queries", 0

If you are using code to run the query, you can just turn of the warnings:

DoCmd.SetWarnings False

but remember to turn them back on again in your exit routine. Or you can as
otherwise mentioned, just use the .Execute method of running your action
query.
 

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

Top