Custom Menu Bar - Print Command

  • Thread starter Thread starter Frank B
  • Start date Start date
F

Frank B

I moved the Print Command to my custom Menu Bar, and it
worked OK, and was context sensitive (i.e. it stayed
greyed until a Report was Active). However, when Print
was selected, it would not prompt for copies, select
printer, etc. I tried without success to get it to
prompt. In the process I not only failed to get it to
prompt, but I lost the context sensitivity. Any ideas how
I lost context sensitity, and how to fix it? And, how to
get it to Prompt?

Thanks,
Frank
 
The way to solve the context problem is to make a custom menu bar for your
reports.

Simply specify the menu bar in the reports property sheet, and it will
appear when a report is launched.

The code that you can use for the print command that will show the print
dialog is:

DoCmd.RunCommand acCmdPrint

If you have a form with a timer event, you can experience a focus problem,
so I actually have my menu option call the following code:

Function DisplayPrintDialog()

On Error Resume Next
DoCmd.SelectObject acReport, Screen.ActiveReport.Name
DoCmd.RunCommand acCmdPrint

End Function
 
Back
Top