Results 1 to 3 of 3
  1. #1
    pbDudley is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Mar 2017
    Location
    New Orleans
    Posts
    72

    One to Many Query

    Hello

    I have 2 tables, 1table has all unique records with a unique record field that I can link to a table with many records per unique value

    I want to create a query or VB code, that would return how many unique records to values



    For example, this would be my unique record: R-7777
    R-7777 would be connected to a table that has many and return this:
    ID Value
    R-7777 W
    R-7777 X
    R-7777 Y
    R-7777 Z
    S-6789 EE
    S-6789 GG

    I would want a way to have the query return ID: 2 Value: 6
    I researched and I see DCount but this appears to just be adding up all of my Unique Records together,
    Any thoughts on how to single out the unique records
    thanks

  2. #2
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Create a totals query and count the number of records:
    - in query design, top left is an icon that looks like a capital E
    - click on that and it will add a new line to the query
    - under the ID field select Group By
    - under any other field select Count

  3. #3
    pbDudley is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Mar 2017
    Location
    New Orleans
    Posts
    72
    Ok thank you, Ill try to work with the totals and get it to work, thank you!

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums