Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    May 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Calc Fields (Word 2000 SP1)

    Hello. Question for someone.
    Using a form field that is defined as a calculation type, I want to not display anything if there is not an amount greater than zero. For example. Field One is the quantity field, Field Two is the Cost Per field and Field Three is Total Cost field. If Field One is 3, Field Two is $25.00, then we calculated Field Three to be $75.00. But if Field One is empty, Field Three should not display (and print) anything. Right now, it displays $0.00

    Thanks in advance.
    mk

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calc Fields (Word 2000 SP1)

    Hi mk:
    I don't think this should be difficult, but today, somehow I'm having trouble comming up with an answer that won't result in a syntax error when the first 2 fields are blank. However, it does calculate the correct result:

    { IF { = { Field1 }*{ Field2 } } <> 0 "{ = ({ Field1 }*{ Field2 }) }" "" }

    where the curly braces are field codes inserted by presssing F9.

    You can also include a picture switch:
    { = ({ Field1 }*{ Field2 }) # "$#,##0.00;( $#,##0.00);" }

    The picture switch can define positive, negative, & zero values, in that order, separated by semi-colons (depending on your Regional Settings Property in Windows Control Panel). By not defining a format for zero, it will be blank.

    However, I've noticed that with both formulas, if Field1 is blank, Field3 returns a Syntax Error.

  3. #3
    New Lounger
    Join Date
    May 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calc Fields (Word 2000 SP1)

    Phil, You're the man!
    We made that work for us. I appreciate your help.
    A couple of the guys here wanted to burn an MS support call! Never underestimate the power of the Forum. Thanks again!
    mk

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •