Print Dialog Box

J

jeff

My question is:
How do I access (using code) the Print Dialog Box?
For example if you have a form and would like to print the form or report,
you can go to FILE, then PRINT, when you click on print it will give you a
dialog box for options, how many pages, the printer that you want to use...
etc. How do you get this dialog box through code?

Thanks is advance,
 
D

Daniel Pineault

The following commands should be what you're looking for.

DoCmd.RunCommand acCmdPageSetup 'Page Setup Dialog
DoCmd.DoMenuItem A_FORMBAR, A_FILE, 6 'Print Dialog
 
Top