Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Forms / July 2004

Tip: Looking for answers? Try searching our database.

Formatting A Formula Output to Currency

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Frank Camean - 25 Jul 2004 22:22 GMT
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.
- 26 Jul 2004 00:09 GMT
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]
> >
> >.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.