January 17, 200520 yr 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
January 17, 200520 yr Specify the number format to have 2 decimal places. In the layout, select the field. Then select Format->Number.
January 17, 200520 yr Author 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
January 17, 200520 yr In that case, check this thread: http://www.fmforums.com/threads/showflat.php?Cat=0&Board=UBB16&Number=140673
January 18, 200520 yr Author 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
January 18, 200520 yr ChqStub= "Payment for: " & PayeeName & "return" & "PaymentAmt: $" & Int ( Round ( TotalPymtAmt ; 2 ) ) & "." & Right ( "00" & Round ( 100 * TotalPymtAmt ; 0 ) ; 2 ) & "Cdn dollars"
January 18, 200520 yr Author Hooray! "Comments" method works exactly as I needed it to. Many thanks. Regards, Shirley
Create an account or sign in to comment