not show or print fields with zeors

  • Thread starter Thread starter Joe70
  • Start date Start date
J

Joe70

running Access 2003 on WinXP

I have one table that has all numbered fields set to zero as a
defaults setting so the calculations will work.
Three of the fields on my report: TAXABLE, RESALE and EXEMPT.
All fields are use but only one per record. How do I prevent the zeros
from showing or printing?
 
Do you want to hide the textboxes or just no let the zeros print. If you
just want to keep the zeros from printing, use Conditional Formatting to set
the ForeColor of the textbox to the same as the BackColor (for a report,
usually White). This will hide the zero. To set Conditional Formatting, open
the report is design view, right click the control, and choose Conditional
Formatting...

If you want to hide the entire textbox, in the Format event of the report's
section, use something similar to

Me.txtMyTextbox.Visible = Not (Me.txtMyTextbox = 0)

or, if you prefer,

If Me.txtMyTextbox = 0 Then
Me.txtMyTextbox.Visible = False
Else
Me.txtMyTextbox.Visible = True
End If
 
I would probably look at this from the other direction.

Remove the zeros(0) from your table, and use IIF statements in your
calculations. Then there aren't any zeros to print.

Sharkbyte
 
Back
Top