Skip to main content

Access Junkie - MVP Alumnus

Access Inside Out Books
Access 2010 FAQ
Access 2007 Training
Access 2007 FAQ
Access 2007 KB Articles
Technical Articles
MSDN Articles
Contact Us
About Us
Member Login
Access 2010 FAQ


Is it possible to write code or use a macro to open the Access Options dialog box in Access 2010??


Yes, this is certainly possible. If you'd like to use a macro to open the Access Options dialog box, you'll need to select the RunMenuCommand action in the Add New Action combo box.


After you select RunMenuCommand in the Add New Action combo box, you'll see one argument called Command for this action on the macro design surface. Select Options from the drop down list of commands. If you can't see all the untrusted command arguments for the RunMenuCommand option in the drop-down list of actions, please see the following page for assistance with that: Related Topic. Your Logic Designer window should now look like this:



Close and save your new macro and then test it out. You'll notice there is an exclamation point to the left of this macro action name. This means that Access won't run this macro unless you have enabled the content this database and/or put the database in a trusted location. To learn more about enabling content, trusted locations, and trusted documents, please see the following page: Related Topic


If you'd like to programmitically open the Access Options dialog box, use the following line of code:


DoCmd.RunCommand acCmdOptions


You could put this code behind the Click event of a command button or in a public module, as the following screenshot illustrates.



As just mentioned, you'll need to enable the content in this database and/or place the database in a trusted location in order for Access to execute this code.


See more tips and tricks like this in my book: Microsoft Access 2010 Inside Out



Back to FAQ main page