Round to the nearest tenth

MsLady

Traumatized by Access
Local time
Today, 15:36
Joined
Jun 14, 2004
Messages
438
I have values for example like, 0.03, 1.14, 1.28 I'd like to round them to the nearest tenth. So resulting values will be as follows:

0.03 = 0.00
1.14 = 1.10
1.28 = 1.30

How do i achieve this? What's the formula?
 
How about the Round() function?
 
RuralGuy said:
How about Int((YourValue+.05)*10)/10
This does it. Thanks! you rule.


Thanks Pbaldy!
 
A different but similar issue in the same form:
Does anyone have an idea why this is not rounding to two decimal places? :mad:

This is a field in my query. bound to a control on my form. I have set the formatting to fixed, 2 decimal places and here's the query expression...

Code:
Expr1: IIf((((([timeOut]-[TimeIn])*24)-7.5)<=0),"",
Round(((([timeOut]-[TimeIn])*24)-7.5),2))
 
Not sure. I just made a query on a table with 2 time fields, copied that in and changed the field names, and it correctly rounded to 2 digits.
 
*sighs
I have no idea what im doing wrong. IT's still not rounding :mad:
 
Can you post a sample db?
 
What version of Access is it? (Could be the reason)

Acc 97 doesn't have Round in the built in functions, 2003 does! (not sure about 2000)
 
Not sure whether this is the answer you want but this pulls back something in the field.

Expr1: IIf((((([timeOut]-[TimeIn])*24)-7.5)<=0),"",CLng(((([timeOut]-[TimeIn])*24)-7.5)))

Cheers
Kempes
 
Kempes said:
What version of Access is it? (Could be the reason)

Acc 97 doesn't have Round in the built in functions, 2003 does! (not sure about 2000)

2000 has it.
 

Users who are viewing this thread

Back
Top Bottom