Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom Toolbar Print Option

Status
Not open for further replies.

Board2Death

Technical User
Apr 27, 2005
88
US
I have created a custom toolbar that is dispalyed when a specific report is open.

The Print option does not display the Print Dialog, but instead immediately prints the report. How do I display the dialog?

TIA...
 
Its not pretty, but you may get it to work. I put this function in a module to bring up the print menu. I then created a macro to run this code. I associated the button to the macro, and it did show the dialog.

'Macro
Action RunCode
Function Name printForm()

'Module Code
Public Function printForm()
On Error Resume Next
DoCmd.DoMenuItem acFormBar, acFile, 9, , acMenuVer70
End Function
 
How are ya Board2Death . . .

With the standard access menubar in view, while in customize, holding Ctrl . . . [blue]drag & drop the print selection from the file menu.[/blue]

Calvin.gif
See Ya! . . . . . .
 
Hi TheAceMan1,

Well, I haven't yet tried stix412's idea, but I did try your Ctrl idea that you suggested. I held the Ctrl down while dragging the Print option from the Standard toolbar to the custom toolbar. This toolbar is only displayed when a report is active. When the report is opened, the toolbar is displayed without the Print button.

I tried making the toolbar visible always, and the toolbar shows the print button and works as expected (displays the print dialog) if I am viewing a form. Any ideas why it does not show the button when a report is open? I am using Access97 by the way...
 
Hey Aceman that works good. I guess you learn a new thing everyday. B2D, set in the Report's properties the toolbar property to your print toolbar.
 
Well,

I got it to work. I had to go to Shortcut Menus under Toolbars -> Customize. Then I went to Report -> PrintView and held Ctrl while I dragged the Print...

Thanks for the help guys. This problem has plagued me for quite some time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top