Put a blank if zero field in report??

bsnapool

Registered User.
Local time
Today, 14:08
Joined
Nov 17, 2006
Messages
96
Hi All,

Tried doing this within query, my current expression is...

Code:
Cost Difference: IIf(Len([SumOfBudget Cost£] & "")=[COLOR="Red"]0[/COLOR],[SumOfActual Cost],([SumOfActual Cost]-[SumOfBudget Cost£]))

When i replace the zero with a "-" or "blank" then it messes up the formatting of the percentage. Is there a way to do this in vba. Something like if zero then make blank??

Any advice would be appreciated.
 
If you want it to be Null then why put a Zero in to start with?

I put a blank to start with but was messing up my formatting.
 
The code does not seem to tie in with the thread heading.

If a field is zeo and you want to display a blank then

IIF(fild=0," ",whatever) should work

Brian
 
School bot error, was using the actual field!! Used a testbox and working.
 
Well put the format as percentage, when added "", it would then take the percentage formatting off.
 
depending whether this is a one time thing or abit of desing you want to implement and Update-Where statement should work fine... just whack it in your form code under a button or create a physical query in the query builder! whatever way you swing!
 

Users who are viewing this thread

Back
Top Bottom