Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with totals 1

Status
Not open for further replies.

dday01

Technical User
Feb 1, 2002
138
US
Hi All,

I have a report that has one group called section and then a list of agencies with details for each group. What I am trying to get is a count for agencies that have a value of X in a specific field by group. So I put a text box in the group footer with the following formula:

=DCount("[name]","qryPrevModStat","[Contacted] = 'X'")

It is giving me a total, but for the whole report and not by section (which is what I need) anyone got any suggestions.

Thanks,

D
 
In the 100s of reports I have created, I have rarely used DCount() or DSum(). I think your most efficient expression is:
[Blue] =Sum(Abs(Contacted="X"))[/Blue]
This assumes Contacted is a text field with a value of "X". Also, having a name of a field "name" is not a good name since every object in Access has a Name property which often times leads to name confusion.


Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Duane,

Thanks alot buddie, that did the trick! Happy holidays

D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top