Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / February 2007

Tip: Looking for answers? Try searching our database.

Turning Confirmation Messages On/Off

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pareez - 28 Feb 2007 14:22 GMT
Is there anyway to turn confirmation messages for record changes, action
queries and document deletions off at the database level?  Instead of going
to the Tools menu and then selecting Options on each PC that accesses the
database, is there anyway to program it into the database, so no matter what
PC is it's accessed from, confirmation messages are turned off?
Fred Boer - 28 Feb 2007 14:34 GMT
Dear pareez:

This can be done in code, but most people would advise you not to do it!
This change would affect all databases, not just yours. Your user would be
justifiably annoyed to find that this setting is being changed behind their
back. You can set this in code using the Application.SetOption method. For
example, in OnOpen Event of the first form of your application, you could
have the following, which sets an option for keyboard behaviour:

Application.SetOption "Behavior Entering Field", 1

You can set all kinds of options this way; there is a table in VBA help.
(Index: SetOptions; Topic "Set options from Visual Basic")

So... :

Application.SetOption "Confirm record changes", False
Application.SetOption "Confirm action queries", False

You could take the trouble to identify the current setting of this property
on opening the application, store this setting, change it for the purposes
of your application and re-set to the original setting before closing the
application, but if the application doesn't close properly, your "resetting"
code might not work.

An alternative would be to use "DoCmd.SetWarnings False" before running code
that will make changes, and then place "DoCmd.SetWarnings True" after the
changes have been made. This won't affect the application, but will prevent
the confirmation messages.

HTH
Fred Boer

> Is there anyway to turn confirmation messages for record changes, action
> queries and document deletions off at the database level?  Instead of
[quoted text clipped - 3 lines]
> what
> PC is it's accessed from, confirmation messages are turned off?
Allen Browne - 28 Feb 2007 14:46 GMT
Fred has answered the specific questions you asked.

If this is for append, delete, update or make table queries, and you want
another alternative to turning SetWarnings off, see:
   Action queries: suppressing dialogs, while knowing results
at:
   http://allenbrowne.com/ser-60.html

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Dear pareez:
>
[quoted text clipped - 37 lines]
>> what
>> PC is it's accessed from, confirmation messages are turned off?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.