How not to display/print zero values in form fields in Word?

G

Guest

Is there any way how not to display/print zero values in form fields
containing calculations in Word 2000?

Example: I have numerical form fields fieldA and fieldB
and fieldC (which has two decimal places) is calculation: fieldC = fieldA *
fieldB

I want to have fieldC blank (not to display nor print "0.00") when fields A
and B are empty.

I have tried many things as well as to apply Excel formatting:
#,##0.00;-#,##0.00;;@
which simply doesn't work :-(

Thanks!
 
G

Graham Mayor

Use a formula field rather than a form field for the calculation (set the
form fields properties to calculate on exit) then
{=({REF FieldA} * {REF FieldB})\# ",0.00;(,0.00);"}
where FieldA & B are the bookmark names of the relevant form fields.
See http://www.gmayor.com/formatting_word_fields.htm for an explanation of
the switch.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?cGV0ZXI=?=,
Is there any way how not to display/print zero values in form fields
containing calculations in Word 2000?

I have tried many things as well as to apply Excel formatting:
#,##0.00;-#,##0.00;;@
This basic approach should work. A couple of tips
- You need to put the formatting switch after the calculation
- be sure to precede it with the \# formatting switch
- the "null" result is specified by two apostrophes
- the entire numeric picture is enclosed in double quotes
- be aware that, if you decide to change the form field options later,
you'll need to recreate the field from scratch (Word will no longer
"recognize" the field properly after this formatting switch has been added)

Example:
=SUM(Above) \# "#,0.00;-#,0.00;''"

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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

Top