Re: Syntax for total text box in footer?
- From: "John Spencer" <spencer@xxxxxxxxx>
- Date: Fri, 7 Mar 2008 08:49:48 -0500
Try
=Abs(Sum([Recommend]))
How it works
A Check box has a value of 0 (unchecked) or -1 (Checked). So we sum the
values and get a negative number for all the boxes that are checked. We use
the Abs function (absolute value) to get rid of the negative sign.
Count counts the presence of a value. The only time Count does not count
something is if the value is NULL. Since 0 and -1 are both values you get a
count of the number of checkboxes. You could count the checks with this
statement
=Count(IIF([Recommend] = True, 1,Null))
amd the non-checks with
=Count(IIF([Recommend] = False, 1,Null))
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
"CW" <CW@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DCFEBB76-3E7C-4359-AC44-14C9474EBDB0@xxxxxxxxxxxxxxxx
I have a report that shows the results of our customer satisfaction
questionnaires.
One of the fields is "Recommend" and the value is a Y/N checkbox.
I want to create a textbox in the report footer that counts the number of
entries where the Recommend value is Y.
I have tried entering this as the control source:
=Count([Recommend]="Y")
which I thought seemed a reasonable attempt, but no good.
Would be very grateful for your advice
Many thanks
CW
.
- Prev by Date: Re: Summary and Detail Report
- Next by Date: Re: Summary and Detail Report
- Previous by thread: Avoid re-queries when printing report
- Next by thread: Re: Diary report
- Index(es):
Relevant Pages
|