I am trying to place two sums in the header of a report. One sums the values
in a CREDITS field when the SUM_CODE field equals "K" and the other when the
SUM_CODE field equals "B".
I remember creating expressions several years ago that used a WHERE clause
to select only certain data to sum, count, or whatever. Is there a reference
to this syntax? As I remember, it was very tempermental. When the Control
Source property window accepts the expression I create, I still get a "#Name"
error in the report.
Try this
=Sum(IIf([SUM_CODE]="K", [CREDITS],0))
=Sum(IIf([SUM_CODE]="B", [CREDITS],0))

Signature
If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.
Good luck
> I am trying to place two sums in the header of a report. One sums the values
> in a CREDITS field when the SUM_CODE field equals "K" and the other when the
[quoted text clipped - 5 lines]
> Source property window accepts the expression I create, I still get a "#Name"
> error in the report.
Jaded in Cali - 26 Oct 2005 15:58 GMT
Ofer
You rock!!! Thank you.
--j