Counting only Yes values from a Yes/No field.

M

Marshall Barton

Ok, it's just for viewing, so you're fine.

I am a little surprised that you're using a form to provide
summary data. I would have expected to use a report to
provide a summary of what the organization has been doing.
OTOH, if you do need a report, it should be pretty easy to
create one based on the same query.
--
Marsh
MVP [MS Access]

What happens is a nurse will have an appointment with a patient in their own
home then when she returns to base she'll hand a form to admin and they'll
simply enter details name address etc then check the relevent boxes for the
activites they did with the patient.

The record wont need to be altered after this initial entry. However every
quarter we have to provide details on what we've been doing etc. This is
where this query comes in we just want to supply the beginning and end dates
of the last quarter and have the details returned of how many of this and
that etc.

Marshall Barton said:
A Totals type (Group By) query is not updatable, because
each record in the query's result set may represent multiple
records in its base table.

Do you want to be able to enter/edit the values in the form
or is this form strictly for viewing the data values? The
answer to that determines if the form needs an updatable
record source query or not.
I work for the NHS and we have to account for everything these days which is
way wee need to know how many of everything we do. I used the

=Abs(Sum([CheckBoxField])) that fred suggested and it works just fine now.
What you mean wont update?


NoviceIan wrote:
Sorry guys I always post in the wrong place for some reason when I post a
comment it defaults to Forms and not the subject I was viewing.

The original comment was supposed to be in queries. I apologise as well for
the lack of detail. I have a form which records details of an appointment
and a subform which records activities to be taken following that appointment.

The query I'm trying to make will count all the true values for each
activity in order for us to understand what we do most etc. So I basically
want the query to work out how many times each activity is done following an
appointment.


:
I don't unerstand why you would want to do that in a query.
The activities subform can do that in a footer text box
using one of the expressions posted elsewhere in this
thread. Note that if you do it in the query, you will have
to use DCount (slow) or make it a totals type query (not
updatable).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top