Link to home
Start Free TrialLog in
Avatar of dcurtis
dcurtis

asked on

Don't Display Zero Values on Report

I have a report based on a query with calculated fields.  Is there a way not to display a zero value on the report?

QUERY - "sum: [Field1]+[Field2]" - If that equals 0, I don't want it to display on the overlying report.
Avatar of DrTech
DrTech

Use the format property of the text field on the report.

Example: $#,##0.00[Green];($#,##0.00)[Red];"Zero";"Null"
Do you actually want to suppress the whole record, or just the field ?

If you want to suppress the record, just put a criteria of <>0 in the calculated field. If you want to hide only the field, you'll need code like this in the OnFormat event of that report section:
If Me!MyTextBox = 0 Then
   Me!MyTextBox.Visible = False
Else
   Me!MyTextBox.Visible = True
End If

Where MyTextBox is the name of the text box containing the calculated field.
ASKER CERTIFIED SOLUTION
Avatar of ACSPanama
ACSPanama

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dcurtis

ASKER

OK, setting a conditional format did the trick.  Thanks.  I knew you could do that in Excel, but was unaware it could be done in Access.  Thanks again.
Avatar of dcurtis

ASKER

OK, setting a conditional format did the trick.  Thanks.  I knew you could do that in Excel, but was unaware it could be done in Access.  Thanks again.