Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004

    Unanswered: Different Subreports for each Record

    Is it possible for each individual record in a report to have different subreports visible at the same time?

    I have a report that is divided up in to subreports but each individual record has a different combination of subreports defined by a query.

    the query looks like this:
    RecId, Surname, Subject1, Subject2, Subject3
    1, Smith, English, Maths, Science
    2, Jones, Art, Drama, English
    3, Doe, Science, PE, History

    The report should look like:
    Report1 - Surname, Smith
    Section1 - English
    Section2 - Maths
    Section3 - Science
    Report2 - Surname, Jones
    Section1 - Art
    Section2 - Drama
    Section3 - English

    My current thinking is to insert all possible subreports on top of each other for all three sections (with labels like: Sec1Maths, Sec2Maths,

    Sec3Maths, Sec1English, Sec2English, Sec3English, Sec1Science, Sec2Science, Sec3Science, etc) and make them all invisible. Then add

    some code that will automatically identify which subject is listed in the subject columns of the query (which have already been added to the

    report as textboxes) and combine the subject name as part of string which is used to identify which subreport is made visible.

    ie: Me!Sec1 & [Subject1].Visible = True
    Me!Sec2 & [Subject2].Visible = True
    Me!Sec3 & [Subject3].Visible = True

    although, as it stands, this code doesn't work.

    Currently as the report stands each record is divided up correctly, ie, the name and the subject textboxes taken from the query are displayed

    correctly for each record and if I change the code so it shows a specifically named subreport (eg: Me!Sec1English.Visible = True) the report

    runs but obviously only displays the same subreports for all the records.

    Am I working along the right idea or am I trying to do the impossible?

  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    What kind of schema do you have setup that requires you to do this... The schema I have in mind for creating this type of report wouldn't require subreports at all...
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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