Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jun 2002
    Nottingham, Nottinghamshire, United Kingdom
    Thanked 0 Times in 0 Posts

    Conditional sub reports (Access 2000)

    I have a report that prints one page per contact. What I want to do is to have a sub report print on that page ONLY when the value of one of the field on the parent report is greater than zero, i.e. if they owe me money they get a printed remittance slip

    I assume I can make the sub report visible or invisible using code that looks at the value owed, but what event do I hang the code on so that it works when printed?

    David Parton

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Conditional sub reports (Access 2000)

    You can put the code in the OnFormat or OnPrint event of the section that contains the subreport. If you have controls in that section below the subreport, set the CanShrink property of the section to Yes, so that the controls can move up if the subreport is invisible.

Posting Permissions

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