non-visible if zero

G

Guest

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;"";""
 
G

Guest

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;"";""
 

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