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.
QUERY - "sum: [Field1]+[Field2]" - If that equals 0, I don't want it to display on the overlying report.
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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.
Example: $#,##0.00[Green];($#,##0.0