Shirley Posted January 17, 2005 Posted January 17, 2005 I have 2 fields - CommAmt and OtherAmt. A third field TotalPymtAmt is the simple? calculation: Round( CommAmt + OtherAmt ; 2) If the first 2 fields contain only whole numbers, the result is a whole number only, no decimal places. How do I get the Round function to calculate whole numbers to xx.00
Ender Posted January 17, 2005 Posted January 17, 2005 Specify the number format to have 2 decimal places. In the layout, select the field. Then select Format->Number.
Shirley Posted January 17, 2005 Author Posted January 17, 2005 Thanks Ender. I guess I didn't fully understand my own problem. I am trying to use the result of this calculation in another calculation (text). ChqStub="Payment for: " & PayeeName & "return" & "PaymentAmt: $" & Round(TotalPymtAmt;2) & "Cdn dollars" Everything works fine, except it only displays the dollars, no cents unless there is actually cents. Regards, Shirley
Ender Posted January 17, 2005 Posted January 17, 2005 In that case, check this thread: http://www.fmforums.com/threads/showflat.php?Cat=0&Board=UBB16&Number=140673
Shirley Posted January 18, 2005 Author Posted January 18, 2005 Again, thanks Ender. I tried out the calcs you suggested, unfortunately they all corrupted my figures. My source fields come in many amts and forms: 15, 148.6, 2378.52 etc. The Round function works fine in the TotalPymtAmt field but, when I place the field in a text calculation field, it reverts to the entry format. I noticed a NumToText Function listed but, it was for Japanese. At this point I don't know where to turn. Regards, Shirley
comment Posted January 18, 2005 Posted January 18, 2005 ChqStub= "Payment for: " & PayeeName & "return" & "PaymentAmt: $" & Int ( Round ( TotalPymtAmt ; 2 ) ) & "." & Right ( "00" & Round ( 100 * TotalPymtAmt ; 0 ) ; 2 ) & "Cdn dollars"
Shirley Posted January 18, 2005 Author Posted January 18, 2005 Hooray! "Comments" method works exactly as I needed it to. Many thanks. Regards, Shirley
Recommended Posts
This topic is 7248 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