Full Version: Displaying to 2 decimal places
UtterAccess Discussion Forums > Microsoft® Access > Access Q and A
DaveSmith2020
I want to display a value in field ToDo to two decimal places in some code. Currently I have this:

ToDo = "$" & Round(([SumOfAmountUS] / [SumOfClicks]) / 2, 2) & "(Decrease)"

But this isn't quite there yet! Any ideas?

The field is a text field since I also append some text after the value.

Thanks,

Dave
Steve Schapel
Dave,

I assume this is the Control Source of a textbox on a form or report?

Try like this:
=Format(([SumOfAmountUS]/[SumOfClicks])/2,"$#,##0.00(Decrease)")
laxmanchip
You could also check the properties of the control and make sure the Format is "Standard" and Decimal Places = 2.
DaveSmith2020
The solution that unfortunately has just been deleted did it. It is a text box so cannot be set to 2 decimal places. Text is appended to the formatted value so it has to be text box. Great solution from the deleted post. :S
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.