Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counting 'Yes' responses from check boxes 2

Status
Not open for further replies.

Howard1024

Technical User
Oct 10, 2003
8
US
I have attempted to implement the suggestions found in other posts and previous responses to my pleas without success. I am preparing a report from a query. The query extracts records with 'injury'and I then need to count the 'yes' responses in six fields and sum two additional fields.

I have tried to count using 'Abs(Sum([Death]=-1))'. I get an error msg 'Extra ) in query expression [Abs(Sum([Death]=-1))].

I am trying to place the count in the report footer using an unbound text box.

What am I doing wrong?
 
Paul,

I tried that and got the following error msg - Syntax error (comma) in query expression '[Sum(IIF([Death)=Yes,1,0))]'.

The square brackets and single quotes were added by the error routine.

Am I doing something wrong? I added a text box and used the recommended formula as the record source.

Thanks for your time and assistance.
 
Is the Field a true Yes/No (Boolean) or is it a Textbox that someone types in Yes or No. If its the first then my original expression should work. If it's the second then try
=Sum(IIf([Death] = "Yes",1,0))

Make sure you add the = sign at the beginning.


Paul
 
Hi, the following should work if it is a check box and the text box is in the report footer.


=Abs(Sum([Death]))
 
The report is working! Paul Bricker and PDLDavis - both of the routines work, my problem in implementing your suggestions was having it in the page footer rather than the report footer section. I'll wear my dunce cap for a day or two. Thanks again.
 
Been there, done that too. Glad you got it working!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top