Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Posts
    38

    Unanswered: One to many relationship

    How can I filter records that have one-to-many relationship? For example I have one person with ten to twenty notes. My query pulls up everything I need but I would like to insert this query as a subform that will allow someone to check off people they would like to view in a report. But the way the query is set up they would have to place a check next to Jane Doe ten times if that’s how many note records she has.
    So I basically just want the name to show up one time even though that person has multiple records.
    I hope this makes sense any other suggestions would be helpful.

  2. #2
    Join Date
    Jan 2004
    Location
    Jersey, UK
    Posts
    108
    Using the Grouping button in a query will present a grouped view of the records. Example:

    Jane Doe | This is a note
    Jane Doe | This is a note
    Jane Doe | This is a note
    Jane Doe | This is a note
    Jane Doe | This is a note

    If you group the above it will appear as 1 record:

    Jane Doe | This is a note

    However, if the notes are different like this...

    Jane Doe | This is a note
    Jane Doe | This is a note too
    Jane Doe | This is a note too
    Jane Doe | This is a note

    ... then the grouping will be like this:

    Jane Doe | This is a note
    Jane Doe | This is a note too


    Regards - Andy

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    You could select only the names/id's present in the target table you wish to filter, something like:

    SELECT DISTINCT nameID FROM tblYourDetailTable

    Then pass that as a parameter to your report

Posting Permissions

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