Solved

COunt Function in Access Report

Posted on 2007-11-19
5
4,594 Views
Last Modified: 2013-11-28
What I have is a report that works off off a Query.  I have something called a branch in the query and I break them into differnet sections on the reports.  What I need to do is count the two branchs seperately instead of together.  If I use =count([branch])  in a text box in the footer it counts them all together.  How do I split them out to count them differently on the report.  The 2 branch fields are  ANG and ARNG.  The ANG lists first on the report together then the ARNG lists.  Thanks
0
Comment
Question by:kdeutsch
  • 3
  • 2
5 Comments
 
LVL 15

Accepted Solution

by:
JimFive earned 125 total points
ID: 20315358
Three options:

1.  The Normal Option, put the count in the Group Footer for the branch.  This has the benefit that when you add a new branch you don't have to change the report.

2.  The Simple Option.  In the Footer use =Sum(iif([branch] = "ANG", 1, 0)) and =Sum(iif([branch] = "ARNG",1,0)) to get the separate totals.
This has the problem that if you add a branch or change the branch code you have to redesign the report.

3.  The real Option.  Create a subreport that lists the branches and the counts.

--
JimFive
0
 

Author Comment

by:kdeutsch
ID: 20315483
Typed in as shown but it will not let me click out of the txtbx fro some reason?
0
 

Author Comment

by:kdeutsch
ID: 20315498
jimfive,
GOt rid of the 2nd = sign.  It works when i do this but returns a 0.  
0
 
LVL 15

Expert Comment

by:JimFive
ID: 20315683
Those need to be in two separate text boxes if you are using option 2.
0
 

Author Closing Comment

by:kdeutsch
ID: 31409985
WOrked when i seperated them.  THanks for help
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question