Consulting

Results 1 to 5 of 5

Thread: Report printing - multiple pages/records

  1. #1
    VBAX Contributor
    Joined
    Apr 2014
    Posts
    109
    Location

    Report printing - multiple pages/records

    There are days when I feel like I get coding quite well, can hold my head up, and even help others. But then there are days like today when feel like I don't know a thing. The answer probably isn't even about coding, but I've been researching this one for a while. So would be so appreciative if someone can assist.

    I am working on a report with Access 2016. The report is basically a receipt. I want to print a year end receipt for all donations received in the past fiscal year. The query lists 317 records as I have not yet added the filters. The eventual goal is about 200 records, but my problem isn't the filter. My problem follows...

    When I look at the report in print view, the first receipt shows fine. But the number of records at the bottom is 1, and the next record button is not enabled. So I closed print view and went to the design view, opened the record source query and viewed it as a datasheet. All 317 records showed up. I close it, go back to print preview, and still only the first record is available. The report is set to cycle through records. There are no filters set in the report, and no vba code behind the report.

    My first goal is how to make it so that the print preview allows the next record to be viewed. I have seen it work this way with reports before, just not sure what I am doing wrong.

    My second goal, not yet mentioned above, is based on the fact that a receipt is a half page in portrait, and I expect that when the next record is available, that I will be able to print two receipts per page, on both sides of the paper. I know that some of this is print settings, but I cannot even get close until I can see a second receipt.

    Thanks for your help in advance.

    Gary

  2. #2
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    I assume that Access 2016 still has the annoying Layout View.
    Have you checked the settings on there as they could be overriding the Design & Print Preview settings.
    If you select just a few records and actually print the report what do you get?
    I know it will waste some paper, but you can always cancel the print.

  3. #3
    VBAX Contributor
    Joined
    Apr 2014
    Posts
    109
    Location
    Thanks, OBP. After reading your ideas, I decided to check out the Layout View, which I have never used - probably because I can convert the margins etc in my mind while in Design View. Anyway, I didn't find anything there. But...

    I feel really egg-in-the-face saying this, but the problem was that I had nothing in Detail and everything in the Page and Report Headers. So it was adding 317 pages of blanks onto the single page. To explain the egg, I had copied a previous report that had a subreport in the Detail pane, then deleted the subreport since I didn't need that part.

    Anyway, so I moved everything in the headers into the detail area, and presto. Now all I have to do is move the rest of the egg!
    So one problem solved.... but....

    ------------------

    I have another question, and am not sure if there is a way to do this in a report, but when printing one page at a time it works. I have vba code which tests certain values, makes applicable textboxes in the report visible as needed, and then requeries the report before printing. It works good on an individual print. However, when placing two receipts per page, is there a way to do the same thing so that the textboxes that need to be visible for one report stay hidden for the second... etc.?

    Thanks

  4. #4
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    If the VBA code is in the Detail's On Format Event Procedure it should work.

  5. #5
    VBAX Contributor
    Joined
    Apr 2014
    Posts
    109
    Location
    May thanks, OBP. That works well.

Posting Permissions

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