Printing Reports

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alinagoo
    New Member
    • Apr 2010
    • 53

    #1

    Printing Reports

    Hi all

    I've created an application based on Access 2007 with many reports and now i want to add "Print" and "Print Preview" options to all reports with full power just like other windows based applications(Th ey must have "Page Setup " enhancements).
    Now i see Access does not give suitable commands or choices to me except a simple preview and a simple printout option with no Flexibility(Suc h as sending print to the network Or number of copies,etc) to do the work!

    Do you have any suggestion or advise?
    Is there a module or code available for this problem?

    Thanks And Best Wishes For All
    A.M
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    Try using the PrintOut method. The printout method works on the active object so you first have to open the report in print preview.

    Code:
    DoCmd.OpenReport "ReportName", acViewPreview
    DoCmd.PrintOut PrintRange, PageFrom, PageTo, PrintQuality, Copies, CollateCopies
    DoCmd.Close acReport, "ReportName"
    PrintRange can be acPages, acPrintAll or acSelection. Default is acPrintAll
    PageFrom is the First page to print. Required if Print range is acPages.
    PageTo is the last page to print. Required if Print range is acPages.
    PrintQuality can be High, Medium, Low, or Draft. Default is High.
    Copies is the number of copies to print. Default is 1.
    Collate Copies Yes or No. The default is Yes.

    Comment

    Working...