Results 1 to 4 of 4
  1. #1
    Nick Bygrave is offline Novice
    Windows 10 Access 2007
    Join Date
    Aug 2021
    Posts
    7

    Programming a report containing multi-page items

    I'm designing a report which is a series of three-page letters to various clients. Depending on a code in the clients' data, on Page 1, I need to show different text, and on Page 3 to include or not include a form.
    Where do I include code in the Report VBA that makes those decisions?


    Thanks for any advice.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Typically the Format event of the section being modified.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    What data/text to put in a report should be governed by the report recordsource (query or table) and not report code. As for deciding whether or not to include a 3rd page, my suggestion would be to have 1 two page report with a subreport control if there is room near the bottom. If you assign a source object to the control in code that opens the report it should expand and create a 3rd page, else remain as a 2 page report. BTW, that control can initially be minimal in height to start in order to fit on the page. If you have no room at the bottom for a subreport control then I don't know.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Nick Bygrave is offline Novice
    Windows 10 Access 2007
    Join Date
    Aug 2021
    Posts
    7
    Thanks for advice. I will try it.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 11-15-2016, 02:14 PM
  2. Reasons multi-page report only shows one page
    By fogyreef in forum Reports
    Replies: 0
    Last Post: 12-29-2015, 08:29 AM
  3. Replies: 4
    Last Post: 08-05-2013, 05:30 PM
  4. Replies: 1
    Last Post: 03-05-2013, 06:38 PM
  5. Replies: 5
    Last Post: 06-01-2012, 03:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums