Solved

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

Posted on 2014-03-19
7
73 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

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

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.

Question has a verified solution.

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

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

821 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