Counting Unique Record #s

H

Help4me

I have a database showing assignments with their subassignments. On reports,
I am attempting to count unique AssignmentIDs under groups (for
example different months the assignments are due). Unfortunately, if the
assignment has two (or more) sub assignments, the count function counts the
AssignmentID twice (since it lists the AssignmentID with the SubAssignment
ID). Do you know a way to get around this so I can count how many unique
main assignments are under each group?
 
J

Jeff Boyce

Totals query. GroupBy your "group"; Count your AssignmentID.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
H

Help4me

Thank you. I actually had already tried that. When I build the report, for
assignments with multiple subassignments, it lists the main assignment twice
with each subassignment (under the group by category) and therefore counts
the main assignment twice.

I have Assignment IDs 5 through 13. AssignmentID 8 has two subassignments
linked to it. Can I count unique AssignmentIDs only once?

Thank you so much for your assistance.
 
D

Duane Hookom

Assuming a Group field header and an AssignmentID header, you can place a
text box in the AssignmentID header:
Name: txtCountSubs
Control Source: =1
Running Sum: Over Group
Then add a text box to the Group Field footer section:
Control Source: =txtCountSubs
 
H

Help4me

Thank you, but that does not work, either. The report lists the main
assignment (that has two subassignments) twice and therefore counts the
record twice.

I appreciate your assistance. I could probably do it if I knew how to write
code, but I do not.
 
H

Help4me

Please disregard my last post. Everything seems to be counting just fine
now! I guess I have all the sorting and fields just the right way! Thank
you SO much everyone!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top