Sum by Qtr in my Report

When I try to change the code to:
=Sum(IIf([Qtr]="1 Qtr - 2011",[FindingTotal],Null)) / [txtSumTotContents])
This code gives me an #error.

When I remove the last colon it changes back to by it's self:
=Sum(IIf([Qtr]="1 Qtr - 2011",[TotalConsents],Null))
 
Brian, we're going round in circles. The code I gave you is what it should be like, but when you go changing it back to your original code we won't get anywhere.
 
Sorry about that I keep getting confused and trying to make it work.
This what I have in the percent textbox:
Name: TxtTotalConsents
=IIf([TotalConsents]=0,Null,Sum(IIf([Qtr]="1 Qtr - 2011",[FindingTotal],Null))/[Totalconsents])

Is this how it should be? If so, this samething does not work in the top two boxes or am I missing something?

The last post were for the top two textboxes.
 
More than 10 posts away I advised you to use this:

=IIf([txtTotalConsents]=0,Null,Sum(IIf([Qtr]="1 Qtr - 2011",[FindingTotal],Null))/[txtTotalconsents])

What does that give you?

txtTotalConsents must be the textbox that sums when qtr is "1 Qtr - 2011"
 
it is giving me 10.667.
I have tried this many times and comes up with the same thing. Sorry if I'm frustrating you!!!
So this is the way it should look like right?
=IIf([TotalConsents]=0,Null,Sum(IIf([Qtr]="1 Qtr - 2011",[FindingTotal],Null))/[Totalconsents])
I removed the Txt since it is not the name of the column name. I tried it both ways. with the Txt it gives me #error.

Can you show the changes in a word doc as I did so I know exactly what I need to change to all the textboxes?
 
So this is the way it should look like right?
=IIf([TotalConsents]=0,Null,Sum(IIf([Qtr]="1 Qtr - 2011",[FindingTotal],Null))/[Totalconsents])
If that was how it is supposed to look I would have said so. I have my reasons why I said should reference the textbox name and not the field name.

Upload your database and I will have a quick look.
 
Here you go. I areally appreciate your help. Truly sorry for getting you frustrated. I have been working on this for 2 days and I am stumped with this one.
 

Attachments

I renamed them then must of not taken on save. I've done so much stuff in it I forget where I left off last. I could have changed it back, I really don't remember. Do you see what I was up against but for you it probably an easy fix. I haven't done this type of thing in a very long time.
 
I did it as I explained it to you (quite a long while ago ;)) and it works.

See attached and copy what was done with 1st quarter. Pay attention to the names of the textboxes and the Format property of the percent textbox.
 

Attachments

THAT IS PERFECT! So sorry for the agrevation! I didn't understand what you meant but I will never forget this one. That's what happens when you have a mental block. Thanks again!!!!!
 

Users who are viewing this thread

Back
Top Bottom