jrp Posted April 5, 2003 Posted April 5, 2003 I'm setting a Letter Body field with auto-entry of a calculated value: some text, then a currency figure from a related field, then more text: ---- FOR SERVICES RENDERED IN ARRANGING " & Upper(type_of_loan) & " LOAN IN THE AMOUNT OF $" & amount_of_mortgage & " ON THE ABOVE REFERENCED PROPERTY WITH " & Upper(Company_Name) &"." ---- I would like the currency to appear formatted, with the "$" and commas in the appropriate places. (ie. $900,000 ) But in a text calculation, only the text (900000) comes out. Does anyone know a handy calculation to parse out the numbers and get the commas in the right place? Many thanks!
RussBaker Posted April 5, 2003 Posted April 5, 2003 You can use merge fields in your letter and then format them how you like, or there is a sample of how to do this for text output in my RussCalcs from Oz file which you can download from the samples section of this forum. Its under the title "Handy Bits" and its on page 2 of the Sample Files section. Go to the end of the post to make sure you get the most current version. It includes cents as well but its easy to remove these from the calculation. Have also emailed you the file.
Lee Smith Posted April 5, 2003 Posted April 5, 2003 This is one that works well. "$" & Middle(Int(YourNumberField), Length(Int(YourNumberField)) - 8, Length(Right(Int(YourNumberField), 9)) - 6) & Case(Length(Int(YourNumberField)) > 6, ",", "") & Middle(Int(YourNumberField), Length(Int(YourNumberField)) - 5, Length(Right(Int(YourNumberField), 6)) - 3) & Case(Length(Int(YourNumberField)) > 3, ",", "") & Right(Int(YourNumberField), 3) & Left(Mod(YourNumberField, Int(YourNumberField)) + .001, 3) Replace YourNumberField with the Number field you have. HTH Lee
Recommended Posts
This topic is 7973 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now