Custom Menu Print

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Thanks for taking the time to read my quesiton.

I am making a menu and want to put the button on the menu that opens the
print dialog box. I can't seem to find it anywhere! I drag the button out
of the File list in the Customize box, and all it does is print the report
right away. I check the properties of the Print button on the default menu
and it looks the same, but the Description says that it will open the print
dialog box, and that it comes from the File menu.

How the heck do I get the right button on there with out taking it off the
main menu?

Thanks,

Brad
 
Hi Brad,

Did u try to use "DoCmd.RunCommand acCmdPrint" in your On Click event button
that u wanna happens it ?

If u execute this statement "DoCmd.RunCommand acCmdPrint", the print dialog
box will be opened.
--
IMPORTANT: Do not forget to rate my answer. Click YES if my post was helpful
for you or NO if was not.

IMPORTANTE: Não esqueça de informar se esta resposta foi útil ou não para
você. Clique SIM ou NÃO.

Grande Abraço,
Rubens Cury
 
just have your menu bar button call code....

The select object command is needed to fix a "focus" bug if you have a form
with a timer function.

For the code that pops up the printer dialog (so the user can change
printers etc).

You can use:

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

The select object command is needed to fix a "focus" bug if you have a form
with a timer function. (if you want...you can delete that select object
command)

The code to print right to the printer while in preview mode can be:

On Error Resume Next
Dim strReportName as string
strREportName = Screen.ActiveReport.Name
DoCmd.SelectObject acReport, strReportName
DoCmd.PrintOut acPrintAll


So, I often have both buttons on my report menu bars ......
 
Back
Top