Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MS Access =count on Form

Posted on 2010-08-27
2
Medium Priority
?
867 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 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
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…
Suggested Courses

885 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