Solved

MS Access =count on Form

Posted on 2010-08-27
2
852 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
[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
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

10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

Question has a verified solution.

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

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.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

630 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