Solved

COunt Function in Access Report

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

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
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 …

707 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

19 Experts available now in Live!

Get 1:1 Help Now