Hiding ribbon - a never ending story

There are lot written about by hiding Ribbon. Still, it seems not be too easy to hide the ribbon. Previously I used the "menu bar" and a application menu bar for the .accde (.mde) application. It worked fine. For to summaries the findings:

* use DoCmd.ShowToolbar "Ribbon", acToolbarNo
* no add-ins
* use dynamic ribbons to replace right-click
* DoCmd.ShowToolbar is not enough use DoCmd.NavigateTo "acNavigationCategoryObjectType" and  DoCmd.RunCommand acCmdWindowHide
* Search for anything which might do something with the ribbon - but what?
* move everything to a new db - sometimes access mix things up. I know, It is not so long ago I did that.
* ...

I use in Form_open event
         If Right(SetDB.Name, 6) = ".accdb" Then DoCmd.ShowToolbar "Ribbon", acToolbarYes Else DoCmd.ShowToolbar "Ribbon", acToolbarNo ' I want the ribbon while developing

Since, the menu bar is still around I disable that one as well - commndbars("Menu bar").enabled=false

I still use commandbars for right-click.

Anyway, Still the File and Home tabs are around, The File contains Privacy Options which means that they change important properties.

There is a lot of XML - code around for this. I have so far not done very much with XML, there is that code and how can I edit it?

What to do?

Thanks advanced

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You would need to provide a customized ribbon, which you can tailor to meet your needs. Working with XML can be daunting, but for ribbon work I use Gunter's RibbonCreator:


That version is for 2016, but he has editions for all Access versions. There are other tools around that do much the same, but I've always ended back up with RibbonCreator.
BAndersConsultantAuthor Commented:
Thanks Scott,

I have started to use Gunter's RibbonCreator(RC) and I found another comment from you about creating USysRibbons table. I have used that example (including  the xml) and my tab is not turning up. Still, I have set in current database the Ribbon to my tab. If I turn of the Full Menu option, File and Home tabs are shown.

When I use the Ribbon creator, I select my tab and RC say the XML is not well formed. Can I use an empty XML and create a Ribbon with About (open a About form in access) and an Exit? Will the File and Home tab been disabled and only the my tab is enabled?

Actually, what I want is to disable the ribbon stuff - especially the File tab. Isn't it a simpler way like DoCmd.ShowToolbar "Ribbon", acToolbarNo?

BAndersConsultantAuthor Commented:
PS By the way, Is it possible to use the option Customize Ribbon to disable the Privacy option group in the File tab? I have never seen any possibilities to change the File tab (not even RibbonCreator
Ensure Business Longevity with As-A-Service

Using the as-a-service approach for your business model allows you to grow your revenue stream with new practice areas, without forcing you to part ways with existing clients just because they don’t fit the mold of your new service offerings.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
I'm not sure you can completely do away with the backstage stuff in Access (like the File and Privacy stuff).

What's the reason for wanting this?
BAndersConsultantAuthor Commented:
For to secure the application - or am I too much worried that the user can do something?
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
The only thing the Privacy and File options allow them to do is exit the program, and set their own privacy options. I can't imagine that would be insecure.

Are you securing the application in other ways, like hiding the navigation pane, disabling shift key, deploying a compiled Runtime application (.accdr), etc etc? If so, then I'd preset the user with a customized ribbon, secure it as well as possible, and be done with it.

If you want something more secure, you'd have to move to a different environment (like .NET).
BAndersConsultantAuthor Commented:
I agree, it is secure enough, but

I have done all that with hiding the navigation pane etc - but when I use the .accde privacy options things like like navigation etc turn up and is possible to change, should it or is it because I use the my own office365 account?
BAndersConsultantAuthor Commented:
I have checked with one of my customer - they see File and Home tabs. In Privacy Options they can change the Navigation Pane on and after restart, for instance, tables are accessible. It is .accde file. The old .mde they couldn't. Have I missed something?

I have Unchecked Full menu blew Ribbons and use DoCmd.ShowToolbar "Ribbon", acToolbarNo in Open event och the startup form.
BAndersConsultantAuthor Commented:
More testing and results.

I have moved the docmd.showtoolbar to the load event. For the .accdb - there is no ribbon at all. For the .accde - there are File and Home and you change items like Navigation Pane. Why the differences?
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Do you see this only on the user machine, or on your machine as well?

Have you tried deploying the file with an .accdr extension? This forces Access to use a Runtime environment.
BAndersConsultantAuthor Commented:
Yesterday I managed to get the showtoolbar toolbarno working = no ribbon at all. But today I moved it to a new location and restored the .aacdb with program files (new db, import of tables, queries, modules and forms - in that order) it isn't working any longer.

I have not so far informed you that have tool (also Access) to set together a release of a system. The system itself consist of .accdb contain all forms, programs, program tables, all queries - a minor part is just used for developing the system. All working data are in a couple of .accdb - files. The release tool perform the following:

1 The development folders are copied to a source release folder.
2 Tables are cleared and some tables, queries, forms are removed, in a module a couple of const statements are edited. As last step the .accdb files are compacted.
 3 Next step is to set the Access options, since it will change the upstart etc. Therefore all the stuff is copied to another folder. During the mdb/mde years it also made the mde file. Today only set the following options for to be able to make an accde:

AppTitle , AppIcon, AllowFullMenus (true, options and saveas must be available), AllowShortcutMenus (false), StartupShowDBWindow (false), StartupShowStatusBar (false), AllowBuiltinToolbars (false), AllowToolbarChanges (true), AllowSpecialKeys (false)

Again, the .accdb are compacted.

Yesterday and today I have noticed the following for the .accdb (docmd.showtollbar set to no):

I put a break at the line for the Docmd.showtolbar. After step 2 it breaks, but not after step 3. Why?

The change I did to the Release tool yesterday was to insert a lot of doevents since - windows are after all an event OS with queues (middle of the 80-ties i gave lectures about Telecom and computer architectures as Stockholm university). This seems to worked yesterday but not to day.

No I haven't tried .accdr, but I would prefer .accde.

B Anders

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You can create the .accde file, and then just rename it to .accdr. You still have all the benefits of the .accde, but the .accdr extension forces Access to run the app in "runtime" mode.

I have no idea why DoCmd.ShowToolbar works sometimes and does not at other times.

As far as differences in the .accde in regard to the toolbar - you must supply your own ribbon for the accde file, else Access will present the user with a default ribbon. As mentioned in my first post, writing ribbon XML by hand is somewhat tedious and error prone, so I'd suggest you get a tool that can do it for you.

.accdb contain all forms, programs, program tables, all queries
I hope you've split the database into a Backend (tables ONLY) and a FrontEnd (everything else). If you don't, then updates to your program will be a real headache. I can't tell if you have done so or not, but if you haven't, you should take steps to do this now.
BAndersConsultantAuthor Commented:
Scott thanks for all help. The accdr as you said early works fine. I should have tried it earlier. The File and Privecy options are ok.

I have for the last 15 years always used front and back-end (with all the application data and linked in to the front-end), but my application use tables for to configure, define and control the product and they are in the front-end.

Since yesterday other more perpendicular things are happening. I have repaired Office but with no result. For instance  when compact repair or when I close a db of 13 Mb. Also when I have used the /decompile switch and several times has the following error occurred:

"The query cannot be completed. Either the size of the query result is larger than the maximum size of a database (2 GB), or there is not enough temporary storage space on the disk to store the query result."

What I know there is no query running.

Tomorrow,  I will re-build the application from the decompiled one.

Lastly, many thanks

BAndersConsultantAuthor Commented:
It solved the problem
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.