INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Distinct Count in Group Footer

Distinct Count in Group Footer

(OP)
Trying to get a distinct count total in the footer of each of my Category groups. I know about:

Name: txtCategory
Control Source: =1
Running Sum: Over All
Visible: No

Name: txtTotalCategories
Control Source: =txtCategory
Running Sum: No
Visible: Yes

However, I need to capture the count for each group, not just the total in the report footer. Placing txtTotalCategories in the group footer isn't yielding what I'm after. Any ideas?


Thanks!!

RE: Distinct Count in Group Footer

(OP)
It's adding the value of the employee group footer with the last value of the previous category group. Let me try to illustrate according to how I have them grouped:


Employee 1
Hats 1 txtCategory Value: 1
Shoes 1 txtCategory Value: 2
Shirts 1 txtCategory Value: 3
Employee 1 Footer: txtTotalCategories Value: 1 Desired txtTotalCategories Value: 3

Employee 2
Hats 1 txtCategory Value: 1
Shoes 2 txtCategory Value: 2
Shirts 7 txtCategory Value: 3
Socks 8 txtCategory Value: 4
Pants 3 txtCategory Value: 5
Employee 2 Footer: txtTotalCategories Value: 6 Desired txtTotalCategories Value: 5

Employee 3
Hats 3 txtCategory Value: 1
Shoes 4 txtCategory Value: 2
Shirts 5 txtCategory Value: 3
Gloves 1 txtCategory Value: 4
Employee 3 Footer: txtTotalCategories Value: 10 Desired txtTotalCategories Value: 4



RE: Distinct Count in Group Footer

Did you change to Over Group? If it was Over All, the numbers would count up from 1 to 12.

I can't get my test to display like you are suggesting.

Another solution is to create multiple group by queries to get your counts and then add these to the record source of your report.

Duane
Hook'D on Access
MS Access MVP

RE: Distinct Count in Group Footer

(OP)
I'll try the multiple group by queries but you would think that if you can add a distinct count to the report footer then you should be able to do the same for a group footer with just a simple field move.

RE: Distinct Count in Group Footer

(OP)
I tried both over group and over all, but neither produced the desired outcome of resetting the count with each group instead of counting up from 1 to 12.

RE: Distinct Count in Group Footer

You stated

Quote (mtownbound)

Name: txtTotalCategories
Control Source: =txtCategory
Running Sum: No
Visible: Yes
but it really seems the Running Sum is not set to No.

Duane
Hook'D on Access
MS Access MVP

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close