decimal places in results

  • Thread starter klp via AccessMonster.com
  • Start date
K

klp via AccessMonster.com

I have a query that sums a field Quantity with criteria <>0. When the results
are displayed on the screen shows correctly. However, if you go to the
quantity field and put your mouse in it, it will show a crazy number like
this -1.77635683940025E-15. On the screen it shows as 0.00. How do I rid of
all these decimals? What I would like is for it not to show at all. I want it
rounded to 3 decimal places, which that is already set. but if it's zero or a
number like that I don't want it to show and everything I've tried has not
worked. I tried setting the properties in the query, using the round function
etc. any other suggestions?

Thanks in advanced
Kim P
 
M

Michel Walsh

Have a criteria, for quantity:

Abs(quantity) ' first line, as computed expression
<1E-3 ' as criteria


or


quantity 'first line
NOT BETWEEN -1E-3 AND 1E-3 ' as criteria


Vanderghast, Access MVP
 
J

John Spencer

A quick fix would be to use the following expression to get the result you want.
IIF(Abs([Quantity])<.00001,[Quantity])

or if you are applying criteria in the query instead of said:

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top