Iif

Vav

Registered User.
Local time
Today, 17:55
Joined
Aug 29, 2002
Messages
36
Hello, several weeks ago I posted a topic about hidding zero values in a report.

A suggestion came back to me that i should use the IIF statement in the control source of that particular text box.

I now understand the theory except it does not seem to work. I keep getting #Error message in the report.

There are the two IIF statements that i was using for the two different text boxes in my report:

=IIF([PR_Prod_Release]=0,"",[PR_Prod_Release])

=IIF([PR_Release]=0,"",[PR_Release])

The two text boxes are currency format.

I am using MS Access 2000.

Can any one suggest a solution? If you require more info please ask. Any help would be appreciated,

Peter Vav
 
Last edited:
"" is a zero-length string which is invalid in a numeric field. Use Null instead.

=IIF([PR_Prod_Release]=0, Null,[PR_Prod_Release])

Currency fields should be set to default to null rather than 0. Zero is a valid value (usually) and has a meaning. Null means that no value was entered.
 
Thank you

Thanks for the advise. It worked great!!

Peter Vav
 

Users who are viewing this thread

Back
Top Bottom