pdvsa
asked on
Format as Currency
Experts, I seem to have an error of "too many arguments" in the below:
="Total for " & [cboPmtMadeYN] & " (USD Equiv):" & format(Sum([Rpmt USD Equiv],"Currency")
I need to format the [Rpmt USD Equiv] as currency.
thank you
="Total for " & [cboPmtMadeYN] & " (USD Equiv):" & format(Sum([Rpmt USD Equiv],"Currency")
I need to format the [Rpmt USD Equiv] as currency.
thank you
Depending on your version of MS Access you can also use the FormatCurrency function.
Try with this:
="Total for " & [cboPmtMadeYN] & " (USD Equiv):" & format(Sum([Rpmt USD Equiv]),"Currency")
="Total for " & [cboPmtMadeYN] & " (USD Equiv):" & format(Sum([Rpmt USD Equiv]),"Currency")
Shaun Kline is right. You are missing parenthesis for Sum Function
ASKER
Hi,
thank you. I thought that currency format would change the text color to RED if negative but I dont believe it will.
I modified to the below but it still doesnt change the text font to red for negative.
="Total for " & [cboPmtMadeYN] & " (USD Equiv): " & Format(Sum([Rpmt USD Equiv]),"$#,##0.00;($#,##0 .00)[Red]" )
Do you happen to notice my error?
thank you. I thought that currency format would change the text color to RED if negative but I dont believe it will.
I modified to the below but it still doesnt change the text font to red for negative.
="Total for " & [cboPmtMadeYN] & " (USD Equiv): " & Format(Sum([Rpmt USD Equiv]),"$#,##0.00;($#,##0
Do you happen to notice my error?
For this you need conditional formatting
You set "less than " 0 and you change to your liking
You set "less than " 0 and you change to your liking
Then Try this:
="Total for " & [cboPmtMadeYN] & " (USD Equiv): " & Format(Sum([Rpmt USD Equiv]),"$#,##0.00;(0)[Red ]")
="Total for " & [cboPmtMadeYN] & " (USD Equiv): " & Format(Sum([Rpmt USD Equiv]),"$#,##0.00;(0)[Red
The error was due to wrong value passed in parameter. You don't need to rewrite '$#,##0.00' in parenthesis before [Red].
It will definitely solve your concern.
It will definitely solve your concern.
ASKER
John, I believe conditional formatting would change the color of the entire text box. I only need the currency to be red.
Dhara: that did not seem to be it either.
let me know if you have another idea. thank you
Dhara: that did not seem to be it either.
let me know if you have another idea. thank you
It should work. I tried it.
ASKER
This is in a report if that matters.
Conditional formatting affects font weight color and background....so use it as you like
ASKER
Thank you. In my report, the red formatting doesnt seem to fire if the value is negative. I have no issue if i break the text box into its parts and leave the number in its own box. The issue with RED format not firing for negatives is when I consolidate it all in one text box.
Let me know if you have any other ideas. Also note my text box is in a report.
Let me know if you have any other ideas. Also note my text box is in a report.
for numbers, the first part of the format code is positive numbers, then negative numbers, then 0 (zero) then null. The data type must be a number, not a string.
"$#,##0.00;[Red]-$#,##0.00 ";(0);""
"$#,##0.00;[Red]-$#,##0.00
ASKER
Hi Crystal: I seem to be getting a syntax:
(I have pasted your comment from above into the format section in the following):
="Total for '" & [cboPmtMadeYN] & "' (USD Equiv): " & Format(Sum([Rpmt USD Equiv]),"$#,##0.00;[Red]-$ #,##0.00"; (0);"")
(I have pasted your comment from above into the format section in the following):
="Total for '" & [cboPmtMadeYN] & "' (USD Equiv): " & Format(Sum([Rpmt USD Equiv]),"$#,##0.00;[Red]-$
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you Crystal....
you're welcome ~ happy to help
the only reason I specified Null code was so you could see where to put some text in (ie: "Fill this out", or whatever) -- leave it off if you are not going to do that
the only reason I specified Null code was so you could see where to put some text in (ie: "Fill this out", or whatever) -- leave it off if you are not going to do that
Open in new window