Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace zeroes with blanks 5

Status
Not open for further replies.

jnix

MIS
Feb 18, 2002
101
US
Is there a way to replace zeroes with blanks on a report, other than by testing for zero through an if statement?
Thanks,jnix
 
In the format property of the control being printed, enter a # symbol. This should suppress zeros. Check the online help associated with this property for more info,
Cheers,
Steve
 
Steve:
Thanks. I should have mentioned that the control is currency. I tried adding # and it didn't work. Any other suggestions?
jnix
 
jnix,
Other suggestion is the format property (again). It can be divided into three parts, depending if the number is positive, negative or zero I think. What you want to do is apply separate formatting strings, dependent on the above. Again, check online help for further details,
Steve
 
jnix try this:
under format there are 4 possible choices positive, negative, zero, and null enter each choice as you would like. For currency try this:
$#,###.##;($#,###.##);$0.00;$0.00
This would be your format for all 4 types: positive, negative, zero, and null. To replace the zero with blanks try this:
$#,###.##;($#,###.##);"";""

Hope this helps

 
Try this:
Sometimes it is easier to create an Unbound Text Box and use the original bound text box in the statement. Then you can go to Properties, Format in the original text box and enter No in Visible.
If the original text box is called [Field1], in the Unbound Text Box, Properties,Data, Control Source,try this:

=IIF([Field1]="0", "Null", [Field1])

Try that. I just got this code from someone named Sailalong on this WONDERFUL website:):):)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top