Count or sum unique records in a report's group footer in Access 2

T

Terri G

How do I sum or count unique records in a report's group footer in Access
2003? For instance, I have several sections/groups, and there are duplicates
in some of them. I'd like the total to count the number of unique records in
each group on the report. Thanks!
 
G

golfinray

Put a unbound textbox in the footer. The make the control sourse of the
tectbox whatever you need, like =Sum([myfield]) or maybe
=Sum([onefiled]+[anotherfield]) You can have as many of those as you need. To
count records you would simply make it a count like =count([myfield]). Then
you can change the caption of the label to whatever you want.
 
D

Duane Hookom

If you want to count groups, you might need to add a running sum text box in
the group header. For instance, if your report contains orders and order
details but you want to count the number of unique orders, you can't use a
text box in the report footer with a control source like:
=Count(OrderID)
This expression will count orders and details.

You can add a text box in the Order header:
Name: txtOrderCount
Control Source: =1
Running Sum: Over All
Visible: No
Then add a text box in the Report Footer section:
Control Source: =txtOrderCount
 

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