Hide Backstage Whilst Allowing Full Menus in Access 2016

dubosity

New member
Local time
Today, 15:27
Joined
Aug 10, 2021
Messages
16
Except for the Intro I just posted, this is my first post to the forum...hi!
I am attempting to remove all but the Exit control on the backstage File menu in Access 2016. I'm so close, but can't seem to get rid of the Home control on the backstage navigation panel or the Recent Files and Templates displays in the backstage main body (columns?).

The catch: I have to have Allow Full Menus turned on; otherwise, I am unable to have Export to Excel, Word, and Email controls visible in my custom ribbon.

I tried to include xml code (which runs error-free) and screenshots of my ribbon and backstage, but I get an error when I try to post with these included.

Would greatly appreciate suggestions from the brain trust!
 
Except for the Intro I just posted, this is my first post to the forum...hi!
I am attempting to remove all but the Exit control on the backstage File menu in Access 2016. I'm so close, but can't seem to get rid of the Home control on the backstage navigation panel or the Recent Files and Templates displays in the backstage main body (columns?).

The catch: I have to have Allow Full Menus turned on; otherwise, I am unable to have Export to Excel, Word, and Email controls visible in my custom ribbon.

I tried to include xml code (which runs error-free) and screenshots of my ribbon and backstage, but I get an error when I try to post with these included.

Would greatly appreciate suggestions from the brain trust!
Attempting to include screenshots:
1628618879572.png


1628618908374.png
 
Hi. I believe it's just a matter of using the correct XML syntax. If you post your backstage XML, we might be able to see what's missing.
 
Are you using any of these?

 
Hi. I believe it's just a matter of using the correct XML syntax. If you post your backstage XML, we might be able to see what's missing.

Attempting to include screenshots:
View attachment 93500

View attachment 93501

When I try to include my code, the forum won't allow me to post. I've tried pasting it in as text and I've tried retyping the backstage portion using the Insert Code tool...no luck. So...here is an image (again, just the backstage stuff, since the ribbon code makes it too long to fit in a single screen capture).

1628620259468.png
 
When I try to include my code, the forum won't allow me to post. I've tried pasting it in as text and I've tried retyping the backstage portion using the Insert Code tool...no luck. So...here is an image (again, just the backstage stuff, since the ribbon code makes it too long to fit in a single screen capture).

View attachment 93502
Ah, looks like you got everything covered. Not sure if/how the Home button can be removed. Let's see if others have any ideas. Cheers!
 
I'm pretty sure I am actually using the code you published, which I happened upon during my extensive search to find working ribbon code...thanks for that, btw!
I think the issue has to do with Allowing Full Menus, which I have to have in order to see certain Export functions in the Ribbon. That darned Home control in the backstage navigation pane goes away when I uncheck the Allow Full Menus option...but so do my export controls in my custom ribbon group.
 
I'm pretty sure I am actually using the code you published, which I happened upon during my extensive search to find working ribbon code...thanks for that, btw!
I think the issue has to do with Allowing Full Menus, which I have to have in order to see certain Export functions in the Ribbon. That darned Home control in the backstage navigation pane goes away when I uncheck the Allow Full Menus option...but so do my export controls in my custom ribbon group.
Ah, I see what you mean. So, in order for the Home button to go away, looks like you'll have to uncheck Allow Full Menus. But to continue to have your regular buttons, looks like you'll have to create a custom Ribbon.
 
The Home button isn't removed by unchecking Allow Full Menus.
You either need to remove the ribbon completely or create a custom ribbon.

This XML code will remove all ribbon items except for an empty File menu:
Code:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
    <ribbon startFromScratch="true">
      <tabs>
           <tab idMso="TabHomeAccess" visible="false" />
      </tabs>
    </ribbon>
    <backstage>
        <tab idMso ="TabPrint" visible="false"/>
       <button idMso="ApplicationOptionsDialog" visible="false"/>
       <button idMso="FileExit" visible="false"/>
       <tab idMso="TabOfficeFeedback" visible="false"/>
   </backstage>
</customUI>

If you want to keep File...Exit, either remove that line or set it to true

I go through the entire process in detail in sections 4 & 5 of this article: Improve Security 2 - Mendip Data Systems
The article also includes many other security measures that may interest you.
 
Thanks isladogs. I've actually gone through your security measures article in depth! It's really well done.
The thing is, I have already created a custom ribbon, which looks exactly right...no Home tab, nor any other default Access tab; only the custom tabs and commands I created.
I tried adding the TabHomeAccess line you mentioned in my custom ribbon code, but it did not remove the Home button from the File menu (ie, backstage) navigation pane. I'm not sure where it's coming from, but it's definitely there as you can see in the screenshot I posted earlier.

Thoughts?
 
The Home menu item on the Access File menu is nothing to do with to the standard Home tab on the ribbon.
The code I gave earlier removes the Home tab from the ribbon

However the Home menu item on the File menu is removed using any of the custom ribbons in my example app.
a) NoPrivacy - just leaves the Print & Exit items
b) SimpleFile - removes all items except for a 'back' arrow
c) SimpleFileNoQAT - as above but also disables the QAT

For example with ribbons b) or c), the backstage view (File menu) looks like this in A365 (version 2107 build 14228.20226):
1628636441923.png


The code for each of those ribbons is in the USysRibbons table in the example app (and listed in the article)
 
Last edited:
Apologies - as you said earlier, all of that assumes that Allow Full Menus is disabled.
You are indeed correct that the Home item on the backstage isn't removed when that is enabled
I'll look into the name of the ribbon command tomorrow.
I've already unsuccessfully tried using:
<tab idMso ="TabHome" visible="false"/>
 
I still think the best solution would be to add the ribbon items you need and disable full menus ... but in the meantime you can get part of the way there from Access Options ...Client Settings.

1628640949091.png



You will then no longer be able to see any items in the Recent or Pinned databases lists.

1628640647706.png
 

Attachments

  • 1628640694719.png
    1628640694719.png
    26 KB · Views: 328
My apologies. I've been distracted the last couple of days and haven't been able to spend any time on my database issue.
Thanks for the recent files tip! I'll do that.

I'd like to describe in more depth why it is necessary for me to have the export commands available; however, I don't have the time right now. I'll try to carve out some time tomorrow or this weekend.

Thanks, again, for your thoughts!
 
My apologies. I've been distracted the last couple of days and haven't been able to spend any time on my database issue.
Thanks for the recent files tip! I'll do that.

I'd like to describe in more depth why it is necessary for me to have the export commands available; however, I don't have the time right now. I'll try to carve out some time tomorrow or this weekend.

Thanks, again, for your thoughts!
If the solution is to create your own custom Ribbon, you should be able to add the same buttons you need out of the Standard Ribbon.
 
Hello...I've finally found a few minutes to attend to this.
Thanks again for your efforts to help.
Unfortunately, I really need the ability to export to Excel and Word and these functions are not available (even on a Custom Ribbon) without Allow Full Menus enabled.

Although it would be ideal to not have the Home button displayed on the File navigation pane, I've decided that it doesn't really do any harm and is just going to have to be good enough as is. I don't have the bandwidth to give to it anymore.

On another note: Upon testing the Exit button on the File navigation pane, which exists per the last line of custom backstage xml [<button id="exit" label="Exit" onAction="=RibbonAction('exit')"/>], I receive an error stating that it's calling for an undefined function. I just removed the line (which means there is no Exit button at the bottom of the pane), as the user can close the window by clicking the "X" in the top-right of the window instead. Nonetheless, I thought perhaps you'd want to know.

Many thanks for all you do for us Access amateurs!
 
Hello...I've finally found a few minutes to attend to this.
Thanks again for your efforts to help.
Unfortunately, I really need the ability to export to Excel and Word and these functions are not available (even on a Custom Ribbon) without Allow Full Menus enabled.

Although it would be ideal to not have the Home button displayed on the File navigation pane, I've decided that it doesn't really do any harm and is just going to have to be good enough as is. I don't have the bandwidth to give to it anymore.

On another note: Upon testing the Exit button on the File navigation pane, which exists per the last line of custom backstage xml [<button id="exit" label="Exit" onAction="=RibbonAction('exit')"/>], I receive an error stating that it's calling for an undefined function. I just removed the line (which means there is no Exit button at the bottom of the pane), as the user can close the window by clicking the "X" in the top-right of the window instead. Nonetheless, I thought perhaps you'd want to know.

Many thanks for all you do for us Access amateurs!
Hi. RibbonAction() is a custom function I use in my demoes. You can download any of my demoes to see it. Otherwise, you could try replacing that last line with either of these:

Code:
<button idMso="FileCloseDatabase" visible="true"/>
or
Code:
<button idMso="FileExit" visible="true"/>
Cheers!
 
Please can you upload a sample database with your custom ribbon. I'd like to play with it and see if I can overcome your problem.
All I actually need is your USysRibbons table and anything else it references so the ribbon works

I see no reason to show the Exit command in the File menu and normally use:
Code:
<button idMso="FileExit" visible="false"/>
but if you do want it, then just use (as stated above)
Code:
<button idMso="FileExit" visible="true"/>
 
When I have <button idMso="FileExit" visible="true"/> in my custom code, I receive an error stating that the control is not found.
I created a sample database...just a USysRibbons table and the options set as I have them currently. There are no other objects and no data, so all controls on the ribbon are grayed out, but you can see what the custom ribbon and File navigation pane look like with the custom ribbon xml applied. SHIFT+open is not disabled, if you need to add a data table.

Good luck!

P.S. I even tried opening as a runtime database. Although this takes care of the whole File menu thing, it also blows away my ability to export to Excel and Word...which, alas, defeats the purpose.
 
When I have <button idMso="FileExit" visible="true"/> in my custom code, I receive an error stating that the control is not found.
I created a sample database...just a USysRibbons table and the options set as I have them currently. There are no other objects and no data, so all controls on the ribbon are grayed out, but you can see what the custom ribbon and File navigation pane look like with the custom ribbon xml applied. SHIFT+open is not disabled, if you need to add a data table.

Good luck!

P.S. I even tried opening as a runtime database. Although this takes care of the whole File menu thing, it also blows away my ability to export to Excel and Word...which, alas, defeats the purpose.
Forgot to attach! Sorry.
 

Attachments

Users who are viewing this thread

Back
Top Bottom