Question:
Can I get a print preview before print a form with VBA DoCmd.PrintOut?
dscharge
2009-05-20 02:50:44 UTC
I'm printing a form from an Access application with DoCmd.Printout. When I press the button the code linked to it prints right to the default printer, what works fine.
I need however a print preview window first to be able to change printer or change settings before printing.

I know I could just get the data put it to a separate report and get a print preview on that I just don't want to spend the time create one more report.
Ideally there should be a way to print a form as it is on the screen with the data in it through a print preview. What is this method?
Four answers:
Eziblogger
2009-05-20 03:30:34 UTC
Yes you can use



DoCmd.RunCommand acCmdPrintPreview



to get a preview of the form. Be warned that using that command will close the form before showing the preview.



If you just want to be able to change the printer before printing then use



DoCmd.RunCommand acCmdPrint



It does not close the form.



Hope that helps.
anonymous
2016-10-13 07:13:55 UTC
Vba Printout
sewrobb
2009-05-20 03:29:26 UTC
I wouldn't have thought so, if there wasn't a print preview in the program.



Why not just print the first page to see what it looks like and then make any necessary adjustments?
anonymous
2016-02-29 01:05:37 UTC
Screenshot and then print


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...