Calculated fields in a report

mariaw

Registered User.
Local time
Today, 08:57
Joined
Jun 9, 2006
Messages
88
Hello

I have the following calculation in a text box on my report:

=IIf([Undef/Def]="u",Count([Undef/Def]))

What I am trying to do is ask the computer to count the records, but only if the character entered in the Undef/Def field is "u" - but it doesn't like it - it just counts them all.....

Any suggestions of how to reword the calculation?

Thanks!

Maria
 
I think you have to do it this way

=Sum(IIF([Undef/Def]="u",1,0)

Brian
 
Also, on an unrelated matter - Do NOT use reserved characters in field names. Characters such as "/" or "#" are frequently used by people in field names, but this will eventually cause you problems. If you can do it, rename them now to avoid problems. You can do a search about these and find many people who have suffered badly due to the use of those characters. It can bite you especially when you are trying to use formulas in forms and reports, as well as other times such as VBA code.
 
Thanks Bob, I actually meant to mention it as it confused me when trying to understand the problem, but "she who must be obeyed":) called as I was typing and it slipped my mind.

Brian
 

Users who are viewing this thread

Back
Top Bottom