Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2012

    Unanswered: I am having problems combining two queries into one report

    The two queries have numerical data involving products. The Numerical Data has different column headers in each query, so I can not simply combine them into one query and create a report based off that.

    I would like it to read

    Report base on
    Query 1

    Sub Reporton
    Query 2

    However, everytime I do this, it either

    1) paste the sub report on top of my actual report if i put it in anywhere in the detail box.
    2) infinitely ask me to enter the paramater value prompt that I have in each query.
    3) does not show every data value in the sub report.

    Basically, where do i place the sub report in my main report to avoid this issue? and why am i getting the enter paramater value non stop? I am entering the same paramamter value for both reports(the product ID)

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    A sub report is effectively a new report for each invocation. So if you have a parameter in the sub report query then it will request a parameter each time. The fix for that is to base the column that you supply as a parameter on the value in the main report.

    However for me if you are using a sub report there has to be some logic which links it to the main report which meansvthat logic should be applied to the query to create a single report.

    I'm not a fan of setting parameter values inside a query as its to easy for a user yo screw up. I far prefer setting such values in a form where you can make certain values are sane before running firms or reports.
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    weejas is offline Grumpy old man (training)
    Join Date
    Sep 2006
    Surrey, UK
    Provided Answers: 18
    If there are no points of equivalence between your two queries, you are going to have a very hard time combining them into one report. After all, without a common field between them, how will Access know which records in the second query relate to which records in the first?

    Subreports (like subforms) work best with one-to-many relationships - is that what you have here?
    10% of magic is knowing something that no-one else does. The rest is misdirection.
    Beers earned: 2

Posting Permissions

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