Hey all.
I am creating a report from a queury I built and for some reason it won't
let me format one of the columns. There is nothing in the drop down box
under Format. Here is the expression:
Expr3: IIf([Expr2]/[SLA]=0," ",[Expr2]/[SLA])
It reflects the correct number, but I want to reflect it as a percent. For
some reason the 'IIf' statement is not formatable? Is that correct?
Any ideas?
Marshall Barton - 13 Mar 2008 20:32 GMT
>Hey all.
>
[quoted text clipped - 6 lines]
>It reflects the correct number, but I want to reflect it as a percent. For
>some reason the 'IIf' statement is not formatable? Is that correct?
Your use of " " is telling Access that the result of the IIf
is a text field. Change that to either Null and it should
work.
OTOH, you don't need to use the IIf at all because the
report text box can use a custom format that won't display 0
values. Maybe something like:
0.00;-0.00;"";""
See Format Property in VBA Help for details.

Signature
Marsh
MVP [MS Access]