Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rouding to the nearest tenth? 1

Status
Not open for further replies.

jlnewbie

Technical User
Aug 9, 2000
69
I nead my query calculation to round up or down to the nearest tenth.
(Ex: 3223.54 = 3220). Excel has a function in addins MROUND that does it but does Access have such a function? Please, I've used Access for about two years but I still consider myself a newbie to side of query design. Thank You
 
If your field is a number field, all you need to do is set your decimal places to the number you need.
In design view select the field you want to round, select properties button from the toolbar and set your decimal place.
 
In design view I'm limited to rounding to zero decimal place. So my value 3223.54 would be round to 3224.0 and not 3220.
You see I have value are PSI (Pounds per Square Inch) that need rounding up to 3230 are 3220. Up to the nearest tenth.
 
Format([FieldToRound]/100,"0.0")*100

JLopez,

Try the above format statement. I have had similar
frustrations with the lack of an overt Round function
in Access. The '/100' part shifts the decimal to the
appropriate location for the 'Format' to do its job.
The '*100' shifts the decimal back. I tried this one
out with your example and a few others and it seems
to work fine.

Hope this helps,
Keith
 
my 2 cents

I'm new to access too but i have been using the the excel rounding functions in queries with no problems. i've put the following expression into a query w/o any problems...CDate(Round(Avg([Date]),0))

in your case you'd want to use the followin in the field descriptor ...

MyFieldNewName: Round([MyInputField],1)

maybe i've gotten an excel library enabled that you guys don't??? but now i'm curious as to why it works for me & not you

rafe
 
Rafe:
I tried your method and no luck. I got the expected "expression Round not Found". I think I'll stick to KMitch's idea.
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top