Solved

COunt Function in Access Report

Posted on 2007-11-19
5
4,595 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Suggested Solutions

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
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 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…

734 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