In Outlook Forms Design, how do you format a FORMULA
output to currency format?
For instance, when adding a User Defined Field, Outlook
prompts you for either TEXT, NUMBER, PERCENT, CURRENCY,
YES/NO, DATE/TIME, DURATION, KEYWORDS, COMBINATION,
FORMULA or INTEGER.
I select FORMULA, where I'm adding 3 different user
defined fields that are of currencty format $###,###.##.
When I run the form, the calculation works, but it
displays the result as a number with no currency
formatting. How can you format the display output to
currencty formatting? Is there something you need to type
in the formula window?
Any light you can shed on this is greatly appreciated.
Thanks.
Sue Mosher [MVP-Outlook] - 26 Jul 2004 00:00 GMT
Try a formula such as:
"$" & Round(expr, 2)
where expr is the express you already have for performing the calculation.
If you want a thousands comma, the formula would get a lot more complicated,
so much so that I'd get rid of the formula field and instead use a currency
field and perform the calculation in form code.

Signature
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
> In Outlook Forms Design, how do you format a FORMULA
> output to currency format?
[quoted text clipped - 15 lines]
> Any light you can shed on this is greatly appreciated.
> Thanks.
Sue, how would you perform the calculation in form code?
Thanks so much for your original reply. It was greatly
appreciated. I tried your suggestion below; it added the
dollar sign, but didn't add the decimal point). Thanks.
Frank
>-----Original Message-----
>Try a formula such as:
[quoted text clipped - 27 lines]
>
>.
Sue Mosher [MVP-Outlook] - 26 Jul 2004 00:43 GMT
Item.UserProperties("total field") = Item.UserProperties("field1") +
Item.UserProperties("Field2") ' etc.
You'll probably want to use the CustomPropertyChange event to have that
total change each time one of the constituent fields changes -- see
http://www.outlookcode.com/d/propsyntax.htm for syntax details

Signature
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
> Sue, how would you perform the calculation in form code?
> Thanks so much for your original reply. It was greatly
[quoted text clipped - 38 lines]
> >
> >.