Share via

MS Access Report Problem - Limiting values reported in a list box

Anonymous
2017-06-23T19:12:03+00:00

I have made a report that lists values from query. Each page of the report lists values from the same row of the query that contains a unique ID number. I also want to add a list box to the report that lists field values from a different query. I only want the list to show values that are tied to the same ID number that is attached to each page of the report. So far I can only show everything from the second query in the list box. How can I limit the values in a list box to only those that match the ID number associated with the report page?

I am fairly competent with making and editing queries, forms, and reports with design view, but am a novice with SQL.

Thank you for any help you can provide.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. ScottGem 68,830 Reputation points Volunteer Moderator
    2017-06-26T15:52:37+00:00

    When you have the report open in Design View, press the Grouping and Sorting icon on the ribbon, this will open the Grouping and Sorting pane where you can add groups and sorts. So what you need is to create a Grouping on CustomerID. Then move all the Customer info into the Group Header. Just leave Order info in the Detail band. Add a Group Footer and set the Footer to force a new page after. 

    The group header will show the Customer info. The Detail will show the orders for that customer.

    This is very standard stuff, btw.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2017-06-26T13:04:07+00:00

    Thank you, Scott. I do have all the data I need in a query, that is what is populating too much data in the list in the report. What I can't figure out is how to display only certain data from that query common to an ID that populates the report. Is "GROUP ON" a command? I'm not familiar with it, but will try to search info on it.

    The basic format of the report I'm trying to make is this:

    Customer ID

    Customer Name

    Customer Contact Name

    Customer Address

    Customer Start Date

    List of Orders (where the query has all customer orders, but I only want the orders associated with this customer ID to display in the report).

    If the report generates one page per Customer ID, how can I generate a list of several records tied to the ID on each particular page of the report?

    I understand that a list box is for data entry and not display, but I can't find any other way to show a list of items in the report.

    Thank you for any clarification or advice you can give.

    Was this answer helpful?

    0 comments No comments
  3. ScottGem 68,830 Reputation points Volunteer Moderator
    2017-06-23T19:37:32+00:00

    A Listbox is control used for data input, not data display.

    What you need to is include all the data in a query, then GROUP ON the One value and include the many in your detail section.

    Was this answer helpful?

    0 comments No comments