Results 1 to 2 of 2
  1. #1
    jalewis999 is offline Novice
    Windows 10 Office 365
    Join Date
    Oct 2020
    Posts
    14

    for each row in a query I want to get a count or list of another query same table.

    I have a table that includes an iD No. (Auto) index and a sponsor's ID No. For each ID No. I would like a count of the Number of Sponsors he has in the table I assume by finding the number of entries showing the current ID No. as the sponsor.
    I have tried using a Dcount as an expr: to print on each line, but I can't seem to get it right.
    I know it could be done by using NEXT and using Dcount or another query in the code, but I was hoping for a cleaner one query aproach.


    Thanks for any ideas.
    I have the latest ver of Access.

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    How about doing an Aggregate (Totals) Query, grouping on the one field, and doing a count of the other field?

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

Similar Threads

  1. Replies: 5
    Last Post: 02-08-2017, 05:52 PM
  2. Replies: 4
    Last Post: 08-24-2016, 06:48 AM
  3. Replies: 1
    Last Post: 09-10-2015, 04:19 AM
  4. Replies: 1
    Last Post: 12-02-2014, 09:26 AM
  5. count value list in a query and report
    By desireemm1 in forum Access
    Replies: 3
    Last Post: 10-23-2014, 11:32 PM

Tags for this Thread

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