Formatting a column

L

Love Buzz

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?
 
M

Marshall Barton

Love said:
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?


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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top