Solved

How to format a calculated field on an Outlook form

Posted on 2007-03-21
1
483 Views
Last Modified: 2011-01-09
Creating an Outlook form, and in using a formula to calculate a field, I cannot figure out how to apply a format to the field.  Example: I am multiplying a price and a quantity to yield a total cost.  The result is unformatted, so it shows "6" instead of $6.00.  I am using Outlook 2003 on Windows XP Pro.

Thanks
0
Comment
Question by:Damian_Gardner
1 Comment
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 18870536
You need to add some code to the form to handle this.  Something like this:

Sub Item_CustomPropertyChange(ByVal Name)
    Dim olkInspector, olkPage
    Set olkInspector = Item.GetInspector
    'Change the page name on the next line as needed
    Set olkPage = olkInspector.ModifiedFormPages("Message")
    'Change the property name on the next two lines as needed
    If Name = "YourPropertyName" Then
        Item.UserProperties("YourPropertyName").Value = FormatNumber(Item.UserProperties("YourPropertyName").Value,2,False,False,True)
    End If
    Set olkPage = Nothing
    Set olkInspector = Nothing
End Sub
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you don't know how to downgrade, my instructions below should be helpful.
MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now