We help IT Professionals succeed at work.

How can I make a custom ribbon only visible for reports?

Shooter54
Shooter54 asked
on
I have a custom ribbon for a Microsoft Access application that restricts users to printing or exporting reports only, which was my goal. I would like to know if there is a way to make this ribbon contextual, so that it is only present when a report is open.
Comment
Watch Question

Most Valuable Expert 2014

Commented:
As far as I know, RibbonHacking does not do the intermediate granularity.
You can specify a Ribbon/ or leave default for each and every object (ultrafine) or hack the Ribbon for the whole application (coarse)
You cannot specify for an object type (reports or forms) by type (intermediate)
You could hack the coarse granularity and have each Reports Open and Close event apply/remove it -- but that involves coding each object.  You may as well apply the hack to the objects themselves and call it a day.

I have a custom ribbon for a Microsoft Access application that restricts users to printing or exporting reports only
Tries to.
Don't kid yourself.
Bulletproof lockdown of the Ribbon, BackStage and NavPain while actually leaving the application functional is incredibly difficult to achieve.
MS had their vision of UI unity across all Office apps.  Nobody asked Access devs if that worked for them.
Even now with Access 2013, if you refresh a TableDef in code, the NavPain pops out, and there's nothing you can do about it.

You can create a USysRibbons entry that closes down a lot of functionality.
You'll have to assign it to every report as the ribbon to use for that object.
And then remember that there will be holes that you cannot plug that allow the user options you'd prefer to keep hidden.
Top Expert 2016

Commented:
open the report in design view, open the property sheet
select the Other tab
in the Ribbon Name  list, select the ribbon
Most Valuable Expert 2014

Commented:
Have a good read here
http://www.experts-exchange.com/Database/MS_Access/Q_28140895.html
It may answer many questions you have about RibbonHacking
Database Architect / Application Developer
Top Expert 2007
Commented:
Here is a sample db showing how to work with Contextual Tabs from Gunter Avenius's site (RibbonCreator 2010/2013)
Download the db and check it out.

http://www.accessribbon.de/en/index.php?Downloads:17

And here is the link to all of the sample dbs
http://www.accessribbon.de/en/index.php?Downloads

GREAT Stuff ... I have all the sample dbs locally.

And if you don't have Ribbon Creator 2010 or 2013 ... GET it ... must have de-facto standard tool for working with Ribbons.
mx