![]() Are you simply hiding the ribbon and that’s it or are you looking to get into ribbon customization and give your users a custom experience. Now your probably saying to yourself “that a lot of work when I could achieve the same thing with a single line of VBA code!?” Yes, it is, but the difference is that I can then easily add other custom ribbons and apply them to individual database objects (printing ribbon for reports, data export ribbon for certain forms, …) now that I have the framework setup. The only way to get it back is to use the shift bypass to regain access to the File menu to be able to change the property. The next time you open your database, the ribbon will be gone. Then it is simply a question of applying it globally to the database File -> Options -> Current Database -> Ribbon and Toolbar Options -> Ribbon Name and selecting the name of the Ribbon we just created. Provide a RibbonName, I keep it simple and use Blank_Ribbon and then use the following RibbonXML Then, you can make a new entry in the table. So I normally just import the table from a previous project as quite often the ribbons are useful, but to start a new USysRibbons table from scratch you can simply run the following query CREATE TABLE USysRibbons ( Then I include a simple ribbon who’s startFromScratch is set to true and has no content (so a blank, non-existent ribbon). Personally, I find using the USysRibbons table the easiest and now include it in all my databases. Now Ribbon XML can be setup in various ways (USysRibbons table, User-defined table, XML File, straight from code, …). Sometimes however, it is nice to have much more control over the ribbon and this is where using custom ribbon XML can become very helpful. DoCmd.ShowToolbar "Ribbon", acToolbarNoĪnd display the ribbon again you simply do DoCmd.ShowToolbar "Ribbon", acToolbarYes Using Ribbon XML In a single line of code (as shown below) it can be removed. The simplest and easiest way to hide the ribbon completely from the user is to use VBA. As per the usual with Access, this can be accomplished a few different ways: One more of these common questions in the forums is how to hide the Access application ribbon completely.
0 Comments
Leave a Reply. |