Solved

Access 2013 (32 bit) Backstage Windows 7 (64 bit)

Posted on 2014-03-19
7
67 Views
Last Modified: 2016-05-29
I have an row in USysRibbons that basically hides the backstage except for the print tab.
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
  <backstage>
   <!-- Info -->
   <tab idMso ="TabInfo" visible="false"/>
   <!-- New -->
   <tab idMso ="TabOfficeStart" visible="false"/>
   <!-- Open -->
   <tab idMso="TabRecent" visible="false"/>
   <!-- Save -->
   <button idMso="FileSave" visible="false"/>
   <!-- Save As -->
   <tab idMso="TabSave" visible="false"/>
   <!-- Print -->
   <tab idMso ="TabPrint" visible="true"/>
   <!-- Close -->
   <button idMso="FileCloseDatabase" visible="false"/>
   <!-- Account -->
   <tab idMso="TabHelp" visible="false"/>
   <!-- Options -->
   <button idMso="ApplicationOptionsDialog" visible="false"/>
  </backstage>
</customUI>

I also have a report that is opened in preview mode as a dialog report from VBA. The report has it's own custom ribbon that only contains the close preview button. The report also has a short cut menu that only allows close. In other words this report can never be printed per my client's specification. My problem is that when the user clicks the File tab on the report's custom ribbon, the Print feature is exposed. How to I disable the backstage Print or make the backstage print invisible only when this report is open in preview mode?
0
Comment
Question by:rmk
  • 3
  • 3
7 Comments
 
LVL 84
ID: 39947303
I believe you also have to include the Ribbon commands to disable the Backstage view in the Report's Custom Ribbon.

See Gunter's article here:

http://www.accessribbon.de/en/index.php?Access_-_Ribbons:Ribbon_XML___Controls:Backstage_View

Essentially, you would include XML like this in your Ribbon code:

<backstage>
<button idMso="FileSave" visible="false"/>
<button idMso="SaveObjectAs" visible="false"/>
etc etc
</backstage>
0
 

Author Comment

by:rmk
ID: 39954285
I'm not sure I understand your comment. That's exactly what I have in my backstage xml in my rbnBackStage row in USysRibbons. I have another row for rbnForm. As far as I know you cannot mix the 2 in 1 row of U.SysRibbons
0
 
LVL 84
ID: 39955555
Have you tried adding the <backstage> sections to your custom Report ribbon?

I've never had the need to completely remove the Backstage stuff ...
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:rmk
ID: 39955838
Like I stated earlier, I don't think you can add backstage sections to custom report ribbon.
0
 
LVL 84
ID: 39957357
Can you post a sample database with your ribbon stuff in it?
0
 

Accepted Solution

by:
rmk earned 0 total points
ID: 40005258
The solution is to reference a different onLoad for each ribbon.

For rbnForm I used:
<customUI ... onLoad="FormRibbonOnLoad" >

For rbnBackStage I used
<customUI ... onLoad="BackStageRibbonOnLoad" >

In VBA I used:
Public grbnForm As IRibbonUI
Public grbnBackStage As IRibbonUI

Public Sub FormRibbonOnLoad(ribbon As IRibbonUI)
    Set grbnForm = ribbon
End Sub

Public Sub BackStageRibbonOnLoad(ribbon As IRibbonUI)
    Set grbnBackStage = ribbon
End Sub

Then I was able to used the Invalidate method of the appropriate global grbn variable as required in code.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now