Solved

COunt Function in Access Report

Posted on 2007-11-19
5
4,589 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now