In Access3 how do you suppress a zero amount on a report detail

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have reports with zero amounts and the user does not wish to see a 0.
What format mask or function do I use to suppress all zeros. In Cobol a
simple Z does this simple formating.
 
Hi:

One simple way to do this --

Select field in Report Design and Click Format | Conditional Formatting..

Here For Field Value "Is Equal To" "0" set Fore Color to same Color as Back
Color of Control.

Regards,

Naresh Nichani
Microsoft Access MVP
 
Hi Jim,

You can use a conditional IF statement, as the control source for a textbox. However, the textbox
*must* have a different name that the field, or else you will get a circular reference error.

Control Source
= IIF([FieldName] = 0, ValueIfTrue, ValueIfFalse)

Use a zero-length string ("") for the ValueIfTrue condition, otherwise, use the fieldname:

= IIF([FieldName] = 0, "", [FieldName])


where FieldName is the current control source of your textbox.

Tom
____________________________________


I have reports with zero amounts and the user does not wish to see a 0.
What format mask or function do I use to suppress all zeros. In Cobol a
simple Z does this simple formating.
 
I have reports with zero amounts and the user does not wish to see a 0.
What format mask or function do I use to suppress all zeros. In Cobol a
simple Z does this simple formating.

The format is a bit more complex in Access. A numeric field can have
FOUR different formats, separated by semicolons, for positive,
negative, zero and NULL respectively. Set the format property of the
textbox to (for instance)

$#,##0.00;($#,##0.00)[Red];"";"MISSING VALUE"

to see $3,223,914.45 for a positive number; ($338.99) in red for
negative; nothing at all for zero; and the words MISSING VALUE if the
field is NULL.

John W. Vinson[MVP]
 

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

Back
Top