Can I get a print preview before print a form with VBA DoCmd.PrintOut?

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?

4 Answers

Relevance
  • 1 decade ago
    Best answer

    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.

    Source(s): Experience
  • wanita
    Lv 4
    3 years ago

    Vba Printout

  • 1 decade ago

    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?

    Source(s): Experienced1
  • 4 years ago

    Screenshot and then print

Still have questions? Get answers by asking now.