Solved

MS Access =count on Form

Posted on 2010-08-27
2
839 Views
Last Modified: 2013-11-28
I am trying to count all the records on my report that have "Yes" in "DutyAssigned" field.
I put =Count([DutyAssigned]=Yes) in the Report Footer and I get a total of all the records. I put it in Page footer and I get #error. What am I doing worng?
0
Comment
Question by:mekah
2 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 33540927
There is no expression of that type in Access.

Use..

Sum (iif(DutyAssigned =Yes, 1,0))

This assumes DutyAssigned is a Yes/No field in the table.

If it is just text then you need..

Sum (iif(DutyAssigned ="Yes", 1,0))
0
 

Author Closing Comment

by:mekah
ID: 33541294
Ah yes, I should have known that. Thanks for the help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

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

25 Experts available now in Live!

Get 1:1 Help Now