If I have a calculated double whose result is sometimes actually a whole #.
something like:
dim num as double
num = 13 * 2
And I try to round that to two decimal places - (Because it looks prettier) using:
Round(num, 2)
I still get 26.
If I try:
Round(num, .01)
I still get 26.
Is there an easy way for me to force the # of decimal places?
FYI - This is not currency, I just have a strong desire for 2 decimal places.
Cheers,
Shawn
Subject: Age Old Rounding Issue
A number is only as long as it is. It can be displayed in any way you want. The field properties gives you the ability to set 2 decimal places.
Format will work, but returns a string so you can’t store that actual value in a number field.
Dan
Subject: RE: Age Old Rounding Issue
Thanks Guys,
This is actually a string in a log so format is exactly what I needed.
Cheers,
Shawn
Subject: Age Old Rounding Issue
try:Format$(num,“Fixed”)
or even better:
Format$(num,“#,0.00”)