M
Michael
Hello All.
I am designing some reports for my boss, and he would like them to be a
little cleaner. For example, one report has a list of items and then a
sumation of the cost (=sum([Amount]). If there happens to be no items
present, the report shows "#Error" because you cannot sum a null value.
I was able to resolve this by using:
=IIf(IsNull([Amount]), "No Data", sum([Amount])
However, I would like to have a more comprehensive approach (to use on other
errors that may occur). Something like the following:
=IIf(IsError(<exp1>), "No Data", <exp1>)
i.e.
=IIf(IsError(sum([Amount]), "No Data", sum([Amount]))
This formula still gives me the "#Error" value. I believe this is due to the
IsError function examining the expression, not the returned value of the
expression.
Is there anyway to force access to evaluate the expression first, to make
sure it reviews the value not the expression? For example,
=IIf(IsError(evaluate(sum([Amount]))), "No Data" ....... or somthing similar?
Any assistance you could provide would be greatly appreciated.
Thanks!
Michael
I am designing some reports for my boss, and he would like them to be a
little cleaner. For example, one report has a list of items and then a
sumation of the cost (=sum([Amount]). If there happens to be no items
present, the report shows "#Error" because you cannot sum a null value.
I was able to resolve this by using:
=IIf(IsNull([Amount]), "No Data", sum([Amount])
However, I would like to have a more comprehensive approach (to use on other
errors that may occur). Something like the following:
=IIf(IsError(<exp1>), "No Data", <exp1>)
i.e.
=IIf(IsError(sum([Amount]), "No Data", sum([Amount]))
This formula still gives me the "#Error" value. I believe this is due to the
IsError function examining the expression, not the returned value of the
expression.
Is there anyway to force access to evaluate the expression first, to make
sure it reviews the value not the expression? For example,
=IIf(IsError(evaluate(sum([Amount]))), "No Data" ....... or somthing similar?
Any assistance you could provide would be greatly appreciated.
Thanks!
Michael