Action Queries

D

Dave Reardon

One of the user options within Access is to confirm action queries. I know a
user can untick this option so that it doesn't alert them to all the queries
that run when my database opens, but I wonder if anyone can suggest a way to
set it programmatically to always untick the box. The problem is if the
profile doesn't load correctly, they get faced with a load of confirmations
including 'are you sure you want to delete... rows' which scares them
somewhat!

Thanks in anticipation

Dave
 
R

RonaldoOneNil

To turn them off
Application.SetOption "Confirm Action Queries",False
To turn them on
Application.SetOption "Confirm Action Queries",True
 
R

Rick Brandt

One of the user options within Access is to confirm action queries. I
know a user can untick this option so that it doesn't alert them to all
the queries that run when my database opens, but I wonder if anyone can
suggest a way to set it programmatically to always untick the box. The
problem is if the profile doesn't load correctly, they get faced with a
load of confirmations including 'are you sure you want to delete...
rows' which scares them somewhat!

Thanks in anticipation

Dave

IMO it would be inappropriate to do so because the settings you describe
would affect all Access apps they run, not just yours.

Do what just about all other developers do and use the Execute method...

CurrentDB.Execute "QueryName or SQL", dbFailOnError

Then you don't get the confirmation prompts.
 
A

Arvin Meyer [MVP]

As Rick mentioned, changing options affects everything. Most of the time I
want to be warned. In addition to SetOption, you can also turn of Warnings:

DoCmd.SetWarnings False
DoCmd.SetWarnings True

and that should be done in the same way. Using Set Warnings, you can also do
it in a Macro. The best method though is to use the Execute method, in VBA
code.
 

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