In part 1, I introduced you to how you can easily customise the Access 2010 Ribbon Bar which was a video tutorial showing the simple steps.
In this final part, I’m going to explain very quickly how one can bind a Ribbon bar to either a form or report as opposed to the application (as previously explained).
It requires the following steps:
- Creating a special ‘system’ table.
- Creating some XML code using an editor.
- Setting a property to bind Ribbon Bar.
Each step can be covered in much more detail than this blog and will be available as an EzineArticle in due course but for now, here’s the overview.
Microsoft Access Database: Customize Access 2010 Ribbon Bar – The Steps
Customising the Access 2010 Ribbon bar requires some XML knowledge or better still getting Microsoft Access to generate the code for you (a neat little trick).
The first step is to create a table and name it USysRibbons which is a specially reserved system table. You will need to add the following three fields (and data types):
The next step is to create some XML code which will build your Ribbon bar and the best way to do this is to customise the Access 2010 Ribbon bar as shown in part 1 but un-tick all the items you do not want leaving just the table as customised & visible.
Export this feature using the Import/Export command available in the ‘Customize Ribbon‘ section from Options (at the bottom of the screen).
It generates a file called ‘Access Customizations.exportedUI’ and can be opened in a text editor like Notepad.
Copy this code as new record in your new table under the field ‘RibbonXML’ and add a name to the ‘RibbonName‘ field.
Open and restart the database file, reset your main Access 2010 Ribbons back to how you want it to be used as globally across the application and then go to a design view for your form or report.
In the form or report, you need to set the property for the form (or report) called ‘Ribbon Name’ located from the ‘Other’ tab (Property Sheet) and choose the ribbon required.
Close and save the object and restart the application.
You now have a personalised Ribbon bar for a loading form (or report).
Microsoft Access Database: Customize Access 2010 Ribbon Bar
You may need to edited the XML code slightly to help display and arrange the icons and groups required and therefore some XML knowledge will help.
For now though, your get the idea!
Keep a look out for more detailed information at my EzineArticles section and I welcome your comments and experiences when customising Access 2010 Ribbon bars.
Tags: access 2010 ribbon, access 2010 ribbon bars, customizing xml ribbon bar, micrfosoft access ribbon bars, microsoft access database, office customization tool 2010
Don’t forget to first show system tables in your Navigation pane (window) by right mouse clicking on the top banner (grey area) and choose Navigation Options.
Remember then to hide this option when finished and your Ribbon table will also be hidden too.
Thanks for your useful explanation.
I had just a small problem that I solved.
On my computer, the xml exported by Access (2010) began with:
“<mso:customUI …"
I had to remove this leading "” to get things to work correctly. Before the removal, the xml present in the table “USysRibbons” would simply be ignored.
Thank you for the well explained article on customizing the ribbon. I’m still having trouble adding forms or reports to it even when I specify the ribbon name I had given in the specific form properties . Do you have any idea why? Is there anything else I need to change?
If you can expand on what you have done, hopefully I can help you further.
In principle, this should be dynamic and show the attached Ribbon bar assigned.
I did everything as explained in your article and managed to create a new ribbon but nothing appears on the ribbon even after I chose the ribbon name in the form options I want to appear on the ribbon. In fact, nothing else is showing on the ribbon such as print, copy that I set visible in my XML. Any idea why?
Ok, we will need to switch on the ‘show add-in user interface error’ option which can be found in the backstage, options, client settings, under the general section. Now restart the database (compact & repair it) and see what the error message says – then come back to me and we can take it from there 🙂
Here’s another link from Microsoft about this topic…
http://office.microsoft.com/en-us/access-help/customize-the-ribbon-HA010211415.aspx