Using an if statement

D

D Pryor

I created a form field that is calculating an expression, however, i want the field to display nothing if there is nothing in another field so i was wondering the correct syntax is for an if statement in word.
Thanks
 
C

Charles Kenyon

I wouldn't use a formfield for the calculation at all. I would use a
calculation field nested in an IF field. Make sure the other field has
"calculate on exit" checked in its properties.

{ IF { Ref "OtherField" } = "" "" "{ = { Ref "OtherField" } * 1.05 }" }


D Pryor said:
I created a form field that is calculating an expression, however, i want
the field to display nothing if there is nothing in another field so i was
wondering the correct syntax is for an if statement in word.
 
M

macropod

If the calculation is purely numeric, simply add a numeric picture switch to
the field like:
\# ,0;-,0;
to the field. Numeric picture switches take three arguments: positive
values, negative values and zero values, each separated by a semi-colon. If
any of these is omitted, the switch for the positive values is used to
format the result. In the above example, the fact that there's nothing after
the last semi-colon tells Word not to display zero values.

Cheers
PS: For more info on Word Field Maths, download the file at:
http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=wrd&Number=365442
(url all one line)

D Pryor said:
I created a form field that is calculating an expression, however, i want
the field to display nothing if there is nothing in another field so i was
wondering the correct syntax is for an if statement in word.
 

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