Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Oct 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Start Record Rpt on Odd Page (Access 2002 SP-1)

    Does anyone know where I could find some code or a quick add-in to start the report of each record on an odd page? I have about 400 records of historic properties, each with the survey data summary, location and plot maps on page 1, images, then a historical descrption memo on page 2. In some cases, the historical description grows to page 3. The final report is printed double sided and we always want the next historic property record to start on the odd page. I'm not too comfortable with VBA, and have only written some myself with a lot of time devoted to postings from here and my various books. This seems like it should be a simple "If ... Then" situation, but I can't think how to get started. Any ideas would really be appreciated. Thank you - Judy

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Start Record Rpt on Odd Page (Access 2002 SP-1)

    In whatever group header you have that contains the "ForceNewPage" property setting, you need to add a PageBreak control (let's assume its name is PageBreak). Then in that group header's Format event you need this simple line of code:
    PageBreak.Visible = ( (Me.Page/2)*2 <> Me.Page)
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    New Lounger
    Join Date
    Oct 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Start Record Rpt on Odd Page (Access 2002 SP-1

    Thank you for the line of code. I entered it, but seem to have the same result that no reports need to add a page. It seems to me the (Me.Page/2) * 2 will always equal Me.Page. Did I miss part of the equation? The e-mail notice of this post was slightly different as (Me.Page/2) * 2 <> Me.Page, but typing that always creates an error and I thought it was just the text editor changing the <> sign.
    Judy

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Start Record Rpt on Odd Page (Access 2002 SP-1

    Try the following variation:

    Me.PageBreak.Visible = ((Me.Page 2) * 2 = Me.Page)

    Note that the division operator has been replaced by the integer division operator
    This makes the result of (Me.Page 2) * 2 different from Me.Page if Me.Pageis odd.
    And the "not equal" has been repaced by =.

  5. #5
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Start Record Rpt on Odd Page (Access 2002 SP-1

    My mistake, I forgot something when I typed it in, should be:
    PageBreak.visible = int( me.page/2) * 2 <> Me.page

    However, this might be easier:
    PageBreak.visible = ((me.page mod 2) = 1)
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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