Setting menu options

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to check the state of the following properties and manipulate
them at run time via VBA/macro:

Tools>Options>Edit/Find>Confirm (all three options).

How do I go about manipulating the properties?

TIA,
RobTheBruce
 
It's a very rare occasion that I find the answer to what I am looking for but:

I created a module <Options> with the following code:
Option Compare Database
'====================================================
'Declare global variables
Dim blnRcdChg As Boolean
Dim blnDocDel As Boolean
Dim blnActQry As Boolean

Function SaveOptions()
'Save existing options
blnRcdChg = Application.GetOption("Confirm Record Changes")
blnDocDel = Application.GetOption("Confirm Document Deletions")
blnActQry = Application.GetOption("Confirm Action Queries")
End Function

Function SetOptions()
'Turn off confirmation options
Application.SetOption "Confirm Record Changes", False
Application.SetOption "Confirm Document Deletions", False
Application.SetOption "Confirm Action Queries", False
End Function

Function ResetOptions()
'Reset options to original values
Application.SetOption "Confirm Record Changes", blnRcdChg
Application.SetOption "Confirm Document Deletions", blnDocDel
Application.SetOption "Confirm Action Queries", blnActQry
End Function
'===================================================

On database startup, I SaveOptions() and SetOptions(). On database close, I
ResetOptions()

HTH someone.
 

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

Back
Top