Action Query Confirmation

T

Terri

Thanks Jim Carlock for opening my eyes to the docmd.close
and then a docmd.exit problem. Removing the docmd.close
worked, if I would have used my brain I would have seen
why that wouldn't work.
Now I have the Confirm Action Queries check box unchecked
on the options dialog box of the tools menu so that the
confirmation messages won't appear. But when I package
the database and load it to the user machine and
unpackage it, the confirmation messages appear. These
really confuse my users and I can't have them. What is
happening?

Thanks in advance.
 
D

Dirk Goldgar

Terri said:
Thanks Jim Carlock for opening my eyes to the docmd.close
and then a docmd.exit problem. Removing the docmd.close
worked, if I would have used my brain I would have seen
why that wouldn't work.
Now I have the Confirm Action Queries check box unchecked
on the options dialog box of the tools menu so that the
confirmation messages won't appear. But when I package
the database and load it to the user machine and
unpackage it, the confirmation messages appear. These
really confuse my users and I can't have them. What is
happening?

Thanks in advance.

These are user-preference options and stay with the installation of
Access where they are set. For a database that you distribute to
others, you want to use code to execute your action queries in such a
way that the confirmation messages aren't displayed. Some people like
to wrap their action queries in calls to the DoCmd.SetWarnings method to
turn warning messages off before running the query and back on
afterward, like this:

DoCmd.SetWarnings False
' run your action queries ...
DoCmd.SetWarnings True

If you do that, you should put error-handling in place to make sure
there's no way an error could cause your procedure to exit without
setting the warnings back on.

Personally, I prefer to use the DAO execute method to run my action
queries, so I never have to use SetWarnings:

CurrentDb.Execute "My Action Query", dbFailOnError

Either way, the setting of the "Confirm Action Queries" option becomes
irrelevant.
 
J

Jim Carlock

:) Boy am I glad something worked for someone! <g>

Thank you for the thanks. I forgot what I replied to and
where it was.

--
Jim Carlock
http://www.microcosmotalk.com/
Post replies to the newsgroup.


:
| Thanks Jim Carlock for opening my eyes to the docmd.close
| and then a docmd.exit problem. Removing the docmd.close
| worked, if I would have used my brain I would have seen
| why that wouldn't work.
| Now I have the Confirm Action Queries check box unchecked
| on the options dialog box of the tools menu so that the
| confirmation messages won't appear. But when I package
| the database and load it to the user machine and
| unpackage it, the confirmation messages appear. These
| really confuse my users and I can't have them. What is
| happening?
|
| Thanks in advance.
|
 

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