Currrency_Decimals

R

Roger Bell

I have the following Text Box in a report:
=Trim("Thank You for your Total Contribution of $" & " " &
[w1]+[w2]+[w3]+[w4]+[w5]+[w6]+[w7]+[w8]+[w9]+[w10]+[w11]+[w12]+[w13]+[w14]+[w15]+[w16]+[w17]+[w18]+[w19]+[w20]+[w21]+[w22]+[w23]+[w24]+[w25]+[w26]+[w27]+[w28]+[w29]+[w30]+[w31]+[w32]+[w33]+[w34]+[w35]+[w36]+[w37]+[w38]+[w39]+[w40]+[w41]+[w42]+[w43]+[w44]+[w45]+[w46]+[w47]+[w48]+[w49]+[w50]+[w51]+[w52]+[w53]
& " " & "of which $" & " " & [text235]*34/100)

However, the [text235]*34/100, displays the result to 3 Decimals. Is there
a way I can adjust this to reflect 2 Decimals?

Thanks for any help
 
J

John W. Vinson

However, the [text235]*34/100, displays the result to 3 Decimals. Is there
a way I can adjust this to reflect 2 Decimals?

Round([text235]*34/100, 2)
 
R

Roger Bell

Thanks for that John
This how it looks now:

=Trim("Thank You for your Total Contribution of $" & " " &
Round([w1]+[w2]+[w3]+[w4]+[w5]+[w6]+[w7]+[w8]+[w9]+[w10]+[w11]+[w12]+[w13]+[w14]+[w15]+[w16]+[w17]+[w18]+[w19]+[w20]+[w21]+[w22]+[w23]+[w24]+[w25]+[w26]+[w27]+[w28]+[w29]+[w30]+[w31]+[w32]+[w33]+[w34]+[w35]+[w36]+[w37]+[w38]+[w39]+[w40]+[w41]+[w42]+[w43]+[w44]+[w45]+[w46]+[w47]+[w48]+[w49]+[w50]+[w51]+[w52]+[w53],2)
& " " & "of which $" & " " & Round([text235]*10/100,2) & " " & " is Tax
Deductable")

Only problem is that if the value is even Dollars, it does not show decimal
and 00.
Is there a way I can fix this?
Many thanks again


John W. Vinson said:
However, the [text235]*34/100, displays the result to 3 Decimals. Is there
a way I can adjust this to reflect 2 Decimals?

Round([text235]*34/100, 2)
 
B

bcap

In the Format properties for the text box, set "Decimal Places" to 2.

Roger Bell said:
Thanks for that John
This how it looks now:

=Trim("Thank You for your Total Contribution of $" & " " &
Round([w1]+[w2]+[w3]+[w4]+[w5]+[w6]+[w7]+[w8]+[w9]+[w10]+[w11]+[w12]+[w13]+[w14]+[w15]+[w16]+[w17]+[w18]+[w19]+[w20]+[w21]+[w22]+[w23]+[w24]+[w25]+[w26]+[w27]+[w28]+[w29]+[w30]+[w31]+[w32]+[w33]+[w34]+[w35]+[w36]+[w37]+[w38]+[w39]+[w40]+[w41]+[w42]+[w43]+[w44]+[w45]+[w46]+[w47]+[w48]+[w49]+[w50]+[w51]+[w52]+[w53],2)
& " " & "of which $" & " " & Round([text235]*10/100,2) & " " & " is Tax
Deductable")

Only problem is that if the value is even Dollars, it does not show
decimal
and 00.
Is there a way I can fix this?
Many thanks again


John W. Vinson said:
However, the [text235]*34/100, displays the result to 3 Decimals. Is
there
a way I can adjust this to reflect 2 Decimals?

Round([text235]*34/100, 2)
 
J

John Spencer

Instead of using the round function use the Format function.

Format(<<<Your calculation >>>, "$#,##0.00")

=Trim("Thank You for your Total Contribution of " &
Format([w1]+[w2]+[w3]+[w4]+[w5]+[w6]+[w7]+[w8]+[w9]+[w10]+[w11]+
[w12]+[w13]+[w14]+[w15]+[w16]+[w17]+[w18]+[w19]+[w20]+[w21]+[w22]
+[w23]+[w24]+[w25]+[w26]+[w27]+[w28]+[w29]+[w30]+[w31]+[w32]
+[w33]+[w34]+[w35]+[w36]+[w37]+[w38]+[w39]+[w40]+[w41]+[w42]
+[w43]+[w44]+[w45]+[w46]+[w47]+[w48]+[w49]+[w50]+[w51]+[w52]+[w53],"$
#,##0.00) & " of which " & Format([text235]*10/100,"$ #,##0.00") & " is Tax
Deductable")


By the way, I see no reason for using the TRIM function in this expression.
It is not going to remove any leading or trailing spaces.

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County

Roger said:
Thanks for that John
This how it looks now:

=Trim("Thank You for your Total Contribution of $" & " " &
Round([w1]+[w2]+[w3]+[w4]+[w5]+[w6]+[w7]+[w8]+[w9]+[w10]+[w11]+[w12]+[w13]+[w14]+[w15]+[w16]+[w17]+[w18]+[w19]+[w20]+[w21]+[w22]+[w23]+[w24]+[w25]+[w26]+[w27]+[w28]+[w29]+[w30]+[w31]+[w32]+[w33]+[w34]+[w35]+[w36]+[w37]+[w38]+[w39]+[w40]+[w41]+[w42]+[w43]+[w44]+[w45]+[w46]+[w47]+[w48]+[w49]+[w50]+[w51]+[w52]+[w53],2)
& " " & "of which $" & " " & Round([text235]*10/100,2) & " " & " is Tax
Deductable")

Only problem is that if the value is even Dollars, it does not show decimal
and 00.
Is there a way I can fix this?
Many thanks again


John W. Vinson said:
However, the [text235]*34/100, displays the result to 3 Decimals. Is there
a way I can adjust this to reflect 2 Decimals?
Round([text235]*34/100, 2)
 
J

John W. Vinson

Thanks for that John
This how it looks now:

=Trim("Thank You for your Total Contribution of $" & " " &
Round([w1]+[w2]+[w3]+[w4]+[w5]+[w6]+[w7]+[w8]+[w9]+[w10]+[w11]+[w12]+[w13]+[w14]+[w15]+[w16]+[w17]+[w18]+[w19]+[w20]+[w21]+[w22]+[w23]+[w24]+[w25]+[w26]+[w27]+[w28]+[w29]+[w30]+[w31]+[w32]+[w33]+[w34]+[w35]+[w36]+[w37]+[w38]+[w39]+[w40]+[w41]+[w42]+[w43]+[w44]+[w45]+[w46]+[w47]+[w48]+[w49]+[w50]+[w51]+[w52]+[w53],2)
& " " & "of which $" & " " & Round([text235]*10/100,2) & " " & " is Tax
Deductable")

I see you got a good answer - thanks, John, the Format() function would
certainly be better!

But it appears that your table structure is "committing spreadsheet". Do you
in fact have 53 currency fields, one for each week? If so, your table design
IS WRONG; you should instead have *three* fields in a second related table,
DonorID, DonationDate and Amount.

If your report is based on a Crosstab query of such a normalized table you're
doing it right - but I'm guessing otherwise! Apologies if my guess was wrong.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top