Solved

How to format a calculated field on an Outlook form

Posted on 2007-03-21
1
481 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Granting full access permission allows users to access mailboxes present in their database. By giving full access permission one can open and read the content of any mailbox but cannot send emails from that mailbox.
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

743 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