Results 1 to 3 of 3
  1. #1
    melhado
    Guest

    Printing reports immediately with criteria (2K, SR-1)

    Form has a button on it which will run a report passing certain criteria. Not a problem, but it is being asked that the report print direct without preview ---
    <font color=blue>
    DoCmd.OpenReport "rptTin_Summary", _
    acViewNormal, , "Run =" & Me.lngRun & ""
    </font color=blue>
    I cannot seem to find any way to set a print quantity with the openreport method, using acViewPreview, and then "docmd.Printout,,,,2" code shows it first, which is not acceptable. I looked at the docmd.SelectObject, acReport, which will allow me to specify the number of copies, but does not seem to accept the criteria.

    Is there any way to have the report print 2 copies and accept the parameter?

    thanks

    'dave

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Printing reports immediately with criteria (2K, SR-1)

    There's no reason you shouldn't be able to print 2 copies and pass parameters in to the report. Try this:

    <pre> Application.Echo False
    DoCmd.OpenReport "rptTin_Summary", acViewPreview, , "Run =" & Me.lngRun
    DoCmd.SelectObject acReport, "rptTin_Summary", False
    DoCmd.PrintOut acPrintAll, , , , 2
    DoCmd.Close acReport, "rptTin_Summary"
    Application.Echo True</pre>

    Charlotte

  3. #3
    melhado
    Guest

    Re: Printing reports immediately with criteria (2K, SR-1)

    I overlooked using the Echo commands to stop it from showing.

    Thanks for pointing it out to me, Charlotte

    'dave

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •