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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Calculation 1

Status
Not open for further replies.

ajhts

Technical User
May 1, 2001
84
US
I have a report calculation problem.

I have this formula at the bottom of the report!

=Sum(IIf([PayorType]<>"a",[Units_Crosstab_2],"0"))

It works great, however, I really want it to place a zero in the field when it does equal "a". It works fine except for it just leaves the field blank instead of placing a zero. Any ideas? Is my formula wrong. I think that I am telling it to place a zero.
It seems to be doing this when it is trying to sum blank fields from above. Don't know if this helps!

AJ
 
Use the Nz() function to convert Null values to ) in a report. As in:
=Sum(IIf([PayorType]<>"a",[Units_Crosstab_2],Nz([Units_Crosstab_2],0)))


Win2000P/Acc2000 - It's best to stay with products that work.
 
Assume the 0 in place of the ) in my response.

Win2000P/Acc2000 - It's best to stay with products that work.
 
Thank you very much, it works perfect now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top