Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Arkansas, USA
    Posts
    163
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Reports and Subforms (Access 2k)

    OK, here is my latest challenge...

    I have a report that has the following filter....([tblOrders].[Order_ID]=[Forms]![frmOrder]![txtOrder_ID]). The purpose is for the report to reflect the information from the current Form (frmOrder). However, frmOrder has a subform (frmItems) which is linked by Order_ID (thanks to Hans V's earlier help). When there are multiple items in the subform, the report opens up with multiple pages. All have the exact same information on them, but I would like to limit the report to one distinct page, so a user printing the form can do so without having to select just one page.

    Is there a way to make the report only show page one?

    Another alternative, although admittedly not the best solution, would be to set the menu option in a custom menu bar for the report to just print page one when print is selected.

    Thoughts?

    As usual, I am indebted to all for the help, especially Hans V, who seems to always answer my questions so quickly.

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

    Re: Reports and Subforms (Access 2k)

    Hi Marc,

    It seems that your report isn't set up entirely right, it shouldn't display multiple identical items. I don't know what the record source of the report is. If it is a query, it may include tables whose information is not needed for the report, or you may have to set the Unique Values to Yes (this is equivalent to adding DISTINCT after SELECT in the SQL statement). Again, without knowing the exact situation, it is hard to say.

  3. #3
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Arkansas, USA
    Posts
    163
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Reports and Subforms (Access 2k)

    Ok, after further investigation, I discovered that I had the tblItems included in the SQL statement for the recordsource. I guess I was thinking that this table had to be included as well, since it contained the items that are in the subform on the report. I guess I did not realize that the fact that the subform had its own recordsource which pulled these items into the report separate from the report's recordsource. if that makes any sense to anyone.

    Bottom line is that when using a subform on a report, the recordsource for the report should not duplicate the recordsource for the subform.

    Correct?

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

    Re: Reports and Subforms (Access 2k)

    Entirely correct!

    Going offline now, it's almost 3 AM here...

Posting Permissions

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