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!

how to set empty fields to "0" in report?

Status
Not open for further replies.

dmbfan715

Technical User
Joined
Jun 27, 2002
Messages
20
Location
US
Hi,

I'm adding 2 fields in a report. The fields are "blank", or empty strings, if there is no calculation done for that record (complicated queries behind it). If one of the two fields is "blank", then the sum is also blank, when it should really return the value of the "nonblank" field. Is my explanation too confusing? How can I set the "blanks" to zeros, so the correct sum is calculated? I tried the IIF using both IsNull and IsEmpty, but that's not working:

IIF( IsNull([CapacityExposure]), "0", [CapacityExposure])

IIF( IsEmpty([CapacityExposure]), "0", [CapacityExposure])

Any suggestions? Thanks in advance! :)

Shivani
 
Thanks grnzbra, but the NZ function isn't working either: this is what I had:

=IIf(NZ([Credit Exp @100%]),"0",[Credit Exp @100%])

I'm still getting #error in the [Credit Exp @100%] field in my report...

Any other suggestions?
 
Shivani,

Try:
Code:
=Nz([Credit Exp @100%], 0)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top