enable only print option to display in the navigation bar

akika

Registered User.
Local time
Today, 02:10
Joined
Aug 7, 2018
Messages
102
Hi,
access 2016, I ve hidden all navigation pane & button in menu bar prior to compile the DB into executable.

How can i enable only the print button to be displayed so that can print the database filtered data that is available.

On form load i have this code.. should anything be added?

Private Sub Form_Load()
'DoCmd.ShowToolbar "Ribbon", acToolbarNo
End Sub
 
Forms are intended for display and reports for print. Each can be made to act somewhat like the other but not as well or easily.

A form can have a command button that opens printer dialog: DoCmd.RunCommand acCmdPrint http://p2p.wrox.com/access-vba/4883-open-print-dialogue-box.html

A report in PrintPreview is not interactive. So button on form can first open report then open print dialog.

Otherwise, customize the ribbon/QAT. Customizing ribbon and QuickAccessToolbar can be complicated and challenging.

https://www.accessribbon.de/en/

https://support.office.com/en-us/ar...n-Access-45e110b9-531c-46ed-ab3a-4e25bc9413de

I use the following XML code for a custom ribbon/QAT that presents the print button when a report is opened. The report RibbonName property is set to: PrintReport, which is the name I assign to this ribbon code
Code:
<customUI xmlns="[URL]http://schemas.microsoft.com/office/2006/01/customui[/URL]">
  <commands>
    <command idMso="Help" enabled="false"/>
  </commands>
  <ribbon startFromScratch="true">
    <officeMenu>
      <button idMso="FileOpenDatabase" visible="false"/>
      <button idMso="FileNewDatabase" visible="false"/>
      <button idMso="FileCloseDatabase" visible="false"/>
    </officeMenu>
    <qat>
      <documentControls>
         <button idMso="PrintDialogAccess"/>
      </documentControls>
    </qat>
  </ribbon>
</customUI>
 
Last edited:

Users who are viewing this thread

Back
Top Bottom