Results 1 to 11 of 11
  1. #1
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Double copies of subreport (Access 97)

    What would cause a subreport to display itself multiple times. If the report is reporting two maintenance workorders the subreport shows up twice. If reporting three WOs it shows itself three times. What are the typical issues with this.
    Thanks.
    Fay

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Double copies of subreport (Access 97)

    Is the subform control appearing twice or three times, or is it a continuous report that shows two or three records?
    Wendell

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

    Re: Double copies of subreport (Access 97)

    This means that the record source for the main report is not correct. It probably contains information that belongs in the subreport, or it contains duplicates.

    I assume that the record source of the main report is a query or an SQL statement (SELECT ...). If it is a query, open it in design view; if is is an SQL statement, click in it, then click the Builder button (the three dots to the right). Click in an empty part in the upper half of the query window, then activate the Properties window. Set the Unique Values property to Yes, then close and save the query.

    See if this removes the problem. If not, examine the record source again, and look carefully if it includes fields which don't belong in the main report, but in the subreport. Remove such fields.

    Hope this helps.

  4. #4
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Double copies of subreport (Access 97)

    It is the subreport appearing two or three times. Each report has all three entires of WOs. I also changed the properties to Unique Values to yes and the subreport did not display at all.

    Thanks
    Fay

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

    Re: Double copies of subreport (Access 97)

    Whose Unique Values property did you set to Yes?

  6. #6
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Double copies of subreport (Access 97)

    I first set the subreport query when that didn't work I just tried the main report. Neither worked.

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

    Re: Double copies of subreport (Access 97)

    Would it be possible to post a stripped down version of the database?
    <UL><LI>Make a copy of the database and work with that.
    <LI>Remove all database objects (tables, queries, forms, reports, macros and modules) that are not relevant to the problem.
    <LI>In the remaining table(s), remove most records - leave only the minimum number necessary to demonstrate the problem.
    <LI>Remove or modify data of a confidential nature.
    <LI>Do a compact and repair (Tools/Database Utilities).
    <LI>Make a zip file containing the database; it should be below 100KB.
    <LI>Attach the zip file to a reply.[/list]That way, Loungers can try to investigate the problem.

  8. #8
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Double copies of subreport (Access 97)

    Here it is. I am sure it is a stupid mistake. Thanks for the help.
    Attached Files Attached Files

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

    Re: Double copies of subreport (Access 97)

    The record source of the main report, i.e. the query qryHistoryReport, is based on tblEquipment and tblHistory. Remove tblHistory from the query, for it has nothing to do with the main report, and it causes the miraculous multiplication of the subreports.

  10. #10
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Double copies of subreport (Access 97)

    Hans got back to you before I did, but he is spot on. You get 3 copies of the second choice because there are 3 entries in the history table, and 2 for the first choice because there are two entries in the history table. You only have one history record for the third choice, but it is blank, so it looks like you don't get any results.
    Wendell

  11. #11
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Double copies of subreport (Access 97)

    Thanks Hans and Wendell. I had changed what I was doing with the query in question. I know I need to clean up better the next time.

    Fay

Posting Permissions

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