Solved

MS Access =count on Form

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
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…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

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

13 Experts available now in Live!

Get 1:1 Help Now