Formatting A Formula Output to Currency

F

Frank Camean

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.
 
S

Sue Mosher [MVP-Outlook]

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.
 
G

Guest

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
 
S

Sue Mosher [MVP-Outlook]

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

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

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