Hello,
I am having a hard time understanding something. I have looked and read a hole bunch of threads on "null", "nz", and "IIF". I am just not getting it.
I have areport that is based on a query, this query will return nothing sometimes, in other words it will have no records at all. One of the fields on the report is a total, this is based on the total feild in the query.
This is what I am trying in terms of code. I put this in the control source of my total field:
=IIf(IsNull([total]),0,[total])
This give me #error, were I would like to have 0
This gives me the same error:
=nz([total],0)
Could anyone clear away the smoke here for me?
I am having a hard time understanding something. I have looked and read a hole bunch of threads on "null", "nz", and "IIF". I am just not getting it.
I have areport that is based on a query, this query will return nothing sometimes, in other words it will have no records at all. One of the fields on the report is a total, this is based on the total feild in the query.
This is what I am trying in terms of code. I put this in the control source of my total field:
=IIf(IsNull([total]),0,[total])
This give me #error, were I would like to have 0
This gives me the same error:
=nz([total],0)
Could anyone clear away the smoke here for me?