?
Solved

Confirm Action Queries

Posted on 2000-05-09
8
Medium Priority
?
1,258 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 10

Accepted Solution

by:
paasky earned 150 total points
ID: 2792544
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
ID: 2792559
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
ID: 2792562
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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
LVL 5

Expert Comment

by:KMAN
ID: 2792563
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
 
LVL 10

Expert Comment

by:paasky
ID: 2792571
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
ID: 2792690
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
ID: 2792723
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
ID: 2792733
You're welcome Johannes.

Regards,
Paasky
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Suggested Courses

764 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