Access 2019 custom ribbons

rltomalin
rltomalin used Ask the Experts™
on
I am moving to Access 2019 from Access 2010.  Initially I had a problem with hiding the ribbon on opening because it seems that the technique used in 2010 no longer works.  
I have now successfully hidden the ribbon when opening the application by using a commend in an AutoExec macro.
That is working fine.

But now testing in more detail I have a problem with my reports.  I currently have a custom tool defined for all my reports.  All this does is to show the Close button and the Print dialogue button at the top.

It seems that these are no longer supported because the buttons are no longer displayed when running the application in Access 2019.

I have done some research and it looks like I will need to create a custom ribbon and call that from each Report.  This requires coding in xml which I will have to mug up on because I have never done that before.

My question is - is this the way that this should be done?  Any tips to make this simple?

Or is it easier to just add two separate buttons to the footer of each report (although this would be more work because each report would have to be editted.

Advice will be very welcome.

Regards

Richard
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
President / Owner CARDA Consultants Inc.
Distinguished Expert 2018
Commented:
No, a custom ribbon is the way way to do this for Access 2007+.

You create a USysRibbons table, input your XML there, then reference you ribbon in your report.

You may like to look at


It can be a pain initially to figure it all out, so arm yourself with patience.
John TsioumprisSoftware & Systems Engineer

Commented:
For just  a couple of buttons you could just add on the Open event of the Reports then opening of a small "floating" form  that will handle that or you could add some context menu.
For the context menu take a look at an older post of mine here : https://www.experts-exchange.com/questions/29161308/Unable-to-change-colour-of-Access-365-datasheet-column-heading-background.html#a42962457

Author

Commented:
Thank you.  I will spend some time looking at custom ribbons tomorrow.
Acronis in Gartner 2019 MQ for datacenter backup

It is an honor to be featured in Gartner 2019 Magic Quadrant for Datacenter Backup and Recovery Solutions. Gartner’s MQ sets a high standard and earning a place on their grid is a great affirmation that Acronis is delivering on our mission to protect all data, apps, and systems.

Dale FyeOwner, Dev-Soln LLC
Most Valuable Expert 2014
Top Expert 2010
Commented:
or you could create a custom Right-Click (shortcut) menu and assign it as the shortcut menu for all of your reports (this is what I do).

You can checkout my series of articles on shortcut menus (command bars) starting with this one or you could download the Access Shortcut Tool and use it to create the menu quickly.
Scott McDaniel (EE MVE )Infotrakker Software
Most Valuable Expert 2012
Top Expert 2014

Commented:
https://accessui.com/Products/RibbonTreeBuilder

I've been playing around with this one lately, and it's pretty neat, and easy to use.

Author

Commented:
Thanks for your suggestions.  I have spent the morning looking at this and I have a solution - but it has complications.

Basically my requirement is (and what my applications have done for years) is completely hide the toolbar/ribbon when opening.  Then open a custom toolbar (containing Print and Close) when opening a report and then back to no toolbar/ribbon when closing the report.

So I now have a nice little piece of XML that displays my ribbon on opening a report.  
I tried to use a custom ribbon to hide the ribbon on opening the application but this never hides the File tab.
So I reverted to my initial solution of using - DoCmd.ShowToolbar "Ribbon", acToolbarNo - called via AutoExec macro.
This gives the completely clean no ribbon without File.  But it then inhibits the custom ribbon loading when displaying a report.

The only solution that I can find for this is to revert to using the AutoExec solution for clearing the ribbon and then issuing - DoCmd.ShowToolbar "Ribbon", acToolbarYes - on opening the report and - DoCmd.ShowToolbar "Ribbon", acToolbarNo - on closing the report.

This works fine but I have lots of Reports to modify and this is just more editing of the Open/Close events.

I know from looking on the Internet that removing the File menu seems to be a problem with the custom ribbon route - but surely there is an answer somewhere.

Regards
Richard

Author

Commented:
Does anyone have any comments before I settle on the solution above and modify all the report definitions please.

Regards
Richard
John TsioumprisSoftware & Systems Engineer

Commented:
Can you please show us a couple of screenshots because there is also the option or Ribbon Invalidate but i am not sure it would be what you want.
the Invalidate works like this...you start your Ribbon and e.g. you have a button disabled...then for some cases you need the button reenabled ...calling the .Invalidate will force the Ribbon to "redraw" taking into account the new parameters (in this case the enabling of the button)

Author

Commented:
Thank you for your inputs.  I have considered what I should do and have decided on the option of using the AutoExec route to hide the ribbon completely.
Then just one simple custom ribbon, that includes only the print and close dialogues, called in each report definition.
Then to allow the custom ribbon to be displayed I will add the - DoCmd.ShowToolbar "Ribbon", acToolbarYes - to the open event of each report and cancel with - DoCmd.ShowToolbar "Ribbon", acToolbarNo - in the close event.
I have about 100 reports to change across several applications - hence my care in deciding on the solution.
However I have always said - the quickest way to get a job done is to start it !!!  So I will allocate a bit of time a crack on.

Best regards
Richard

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial