Question : Confirm Action Queries

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).  

Answer : Confirm Action Queries

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
Random Solutions  
 
programming4us programming4us