Background:
My Access app has to be locked down to prevent users from accessing the database window or tweaking code. In 2003 I hide all the toolbars when the app is opened and open a custom toolbar as needed. For example, when a user opens a report I open my custom toolbar. In 2010 this has not been as easy.
Steps Tried:
At first the docmd.showtoolbar "ribbon", actoolbarno appeard to be a great solution, but I have not been able to hide and show like I did in 2003. I tried using the Ribbon Name property, of the report, but no ribbon opens once the showtoolbar code above is run. Also, I tried a macro to show the ribbon. No luck.
Possible solution:
Today I tried creating a custom ribbon by exporting the ribbon code for Print Preview to XML. I entered the code in the RibbonXml column on the USysRibbons table. Next I went to the Ribbon Name (File / Options / Current Database) option and changed it to my custom toolbar. This makes my custom ribbon the only ribbon used by the application. So if execute docmd.showtoolbar "ribbon" actoolbaryes then my custom ribbon is the only one seen.
Drawbacks:
1. The File Tab still appears. Still working on this.
2. This appears to only allow one ribbon to appear. So if you need to toggle or show other ribbons this may not work.
I say appears and may not because I am not sure myself. I am making this post in hopes someone may find a simpler way or an alternative.
Any questions or other solutions please let me know.
My Access app has to be locked down to prevent users from accessing the database window or tweaking code. In 2003 I hide all the toolbars when the app is opened and open a custom toolbar as needed. For example, when a user opens a report I open my custom toolbar. In 2010 this has not been as easy.
Steps Tried:
At first the docmd.showtoolbar "ribbon", actoolbarno appeard to be a great solution, but I have not been able to hide and show like I did in 2003. I tried using the Ribbon Name property, of the report, but no ribbon opens once the showtoolbar code above is run. Also, I tried a macro to show the ribbon. No luck.
Possible solution:
Today I tried creating a custom ribbon by exporting the ribbon code for Print Preview to XML. I entered the code in the RibbonXml column on the USysRibbons table. Next I went to the Ribbon Name (File / Options / Current Database) option and changed it to my custom toolbar. This makes my custom ribbon the only ribbon used by the application. So if execute docmd.showtoolbar "ribbon" actoolbaryes then my custom ribbon is the only one seen.
Drawbacks:
1. The File Tab still appears. Still working on this.
2. This appears to only allow one ribbon to appear. So if you need to toggle or show other ribbons this may not work.
I say appears and may not because I am not sure myself. I am making this post in hopes someone may find a simpler way or an alternative.
Any questions or other solutions please let me know.