Solved

Confirm Action Queries

Posted on 2000-05-09
8
1,064 Views
Last Modified: 2010-10-05
I would like to turn off the three checkboxes under "Tools--Options--Edit/Find Tab--Confirm" using a macro or visual basic code.  These checkboxes turn off confirmation messages for Action Queries, Record Changes, and Document Deletions.

These settings are not saved with the database, instead they are computer specific.  I would like to be able to turn them off when starting up an application so that each user does not have to go in and manually turn them off.

I am aware of the SetWarnings method, but it seems to turn off more than what I want it to (all modal messages).  
0
Comment
Question by:Johannes030399
8 Comments
 
LVL 10

Accepted Solution

by:
paasky earned 50 total points
Comment Utility
Hello Johannes,

You could try these functions:

This function is called from the startup form or Autoexec macro

Public Function Initialize() as Boolean
   Application.SetOption "Confirm Action Queries", False    
.....
End Function


And this function to quit application:

Public Function Quit_Application()
   if msgbox ("Do you want to quit",vbYesNo,"Quit?") = vbNo then exit sub
   Application.SetOption "Confirm Action Queries", True    
.....
End Function

Hope this helps,
Paasky
0
 
LVL 4

Expert Comment

by:berg1375
Comment Utility
If you set the warnings to false on start up, you can then set them back to true when you are done with the code and startup.

0
 
LVL 10

Expert Comment

by:paasky
Comment Utility
If you want to restore the original setting value (user may have turned warnings off), you should store the value in the table or global variable.

To get the value of this setting, here's an example:

OriginalSetting = Application.GetOption ("Confirm Action Queries")

Paasky
0
 
LVL 5

Expert Comment

by:KMAN
Comment Utility
These are registry settings.  

HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Access\Settings

Confirm Action Queries
Confirm Document Deletions
Confirm Record Changes

These are DWORDs, Set to 0 for no confirmation.
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 10

Expert Comment

by:paasky
Comment Utility
and then assign the original value of setting when you quit:

Public OriginalSetting As Boolean

.....

Application.SetOption "Confirm Action Queries", OriginalSetting  
0
 

Author Comment

by:Johannes030399
Comment Utility
Thanks.  It's a little slower than I expected (hoped) it would be, but I guess there is no way around that.
0
 
LVL 5

Expert Comment

by:KMAN
Comment Utility
Keep in mind all other Access instances will also be affected by the changes made by your application.  You might also consider doing these registry changes during an install, instead of each session.
0
 
LVL 10

Expert Comment

by:paasky
Comment Utility
You're welcome Johannes.

Regards,
Paasky
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now