Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2002
    Posts
    23

    Question Unanswered: How do I set a report to print out three copy without previewing the report

    Hi,

    I need some help. I have a form with several selection for certain report and a command print button. I would like to print 3 copy of the same report just by clicking the command print button. I try to use the PrintOut but everytime it printed the form not the report. Can someone help me. Thanks

  2. #2
    Join Date
    Apr 2002
    Posts
    168
    AccessNewbie,

    You can do it by using "DoCmd.SelectObject acReport, ReportName" before you do docmd.printout. Docmd.printout always prints out active form/report, that's why it printed the form instead of the report. Hope this helps.

  3. #3
    Join Date
    Apr 2002
    Posts
    139
    Another way is to use the OpenReport action, iso Printout.

    Like in: DoCmd.OpenReport "MyReport", acViewNormal
    The argument acViewNormal will print the report directly.

    The other two possible arguments are:
    acViewDesign: will open the report in -yes- desing view
    acViewPreview: will open the report in preview.

    Maybe, when you review your code, it uses acViewPreview at this moment.

    For the three copies, I would run the command three times.

    Ciao

  4. #4
    Join Date
    Apr 2002
    Posts
    168
    marion,

    Do you use report filter often ? I used that, but it seems, it is unstable when I want to print. Sometimes, what is print-preview is not what is printed. Do u know why ? Is that true that grouplevel property can only be modified during report-open event ? Thanks.

  5. #5
    Join Date
    Apr 2002
    Posts
    139
    Milan,

    QUOTE: Do you use report filter often ?
    No, not really, but I can not remember instable behaviour when I did.

    Most of the times I make a parameter query, that takes the parameter(s) from the user form. The report then is based on this query, not on the full table with filter.

    If the query becomes too complex, I sometimes use a make-table query to save the recordset in a temporary table.

    QUOTE: Is that true that grouplevel property can only be modified during report-open event ?
    No idea really, I do use the grouping command every now and than like:

    Private Sub Report_Open(Cancel As Integer)
    GroupLevel(0).ControlSource = Forms![FormToSelectReport]![FieldToGroupOn]
    End Sub

    Maybe this helps!
    Marion

Posting Permissions

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