non-visible if zero

P

Phil

Hi,
I have a report with several numeric fields. If the value is zero I don't
what it to show. Is this possible? The visible properity is yes/no. Is
there a way to not have it show if the value is zero?

Thanks,
 
R

RoyVidar

Phil said:
Hi,
I have a report with several numeric fields. If the value is zero I don't
what it to show. Is this possible? The visible properity is yes/no. Is
there a way to not have it show if the value is zero?

Thanks,

There are probably several ways, one, could be to use the on format
event of the section in which the control resides, and use something
like the following

Me!txtTheControl.Visible = (Me!txtTheControl.Value <> 0)

If there's a chance it could be Null, you could use

Me!txtTheControl.Visible = (NZ(Me!txtTheControl.Value) <> 0)

Then, you could also use the format property of the control. Say,
you're using a format like # ##0.00, then stuff the following into
the format property

# ##0.00;# ##0.00;"";""
 
P

Phil

Thanks RoyVidar,

That worked great.
--
Phil


RoyVidar said:
There are probably several ways, one, could be to use the on format
event of the section in which the control resides, and use something
like the following

Me!txtTheControl.Visible = (Me!txtTheControl.Value <> 0)

If there's a chance it could be Null, you could use

Me!txtTheControl.Visible = (NZ(Me!txtTheControl.Value) <> 0)

Then, you could also use the format property of the control. Say,
you're using a format like # ##0.00, then stuff the following into
the format property

# ##0.00;# ##0.00;"";""
 
Top