calculation rounding down

G

Guest

My query is working fine except that it's calculation is rounding down:

SELECT tblFacilitiesCasesProduced.txtFacilityID, (Format([ProdDate],"mmm""
'""yy")) AS ProdDate1, tblFacilitiesCasesProduced.TotalCasesProduced,
([TotalCasesProduced]\100000) AS DividePer100M
FROM tblFacilitiesCasesProduced;

For the value 255,000 I'm expecting "2.55" however Access is rounding down
to "2.00".

How can I remedy this?

Thanks for your help!
 
G

Guest

John, you are using the Integer Divide symbol (\) rather than the normal
division symbol (/), but if you want to ensure you will get 2 decimals, you
need to use the round or Format functions to get it formatted precisely the
way you want.

HTH
Dale
 
G

Guest

Thanks for pointing out the obvious! Yikes. I kept looking at it "funny" but
it never registered. I changed to the (/) symbol and all is working as it
should now.

Thanks!
--
www.Marzetti.com


Dale Fye said:
John, you are using the Integer Divide symbol (\) rather than the normal
division symbol (/), but if you want to ensure you will get 2 decimals, you
need to use the round or Format functions to get it formatted precisely the
way you want.

HTH
Dale

--
Email address is not valid.
Please reply to newsgroup only.


JohnLute said:
My query is working fine except that it's calculation is rounding down:

SELECT tblFacilitiesCasesProduced.txtFacilityID, (Format([ProdDate],"mmm""
'""yy")) AS ProdDate1, tblFacilitiesCasesProduced.TotalCasesProduced,
([TotalCasesProduced]\100000) AS DividePer100M
FROM tblFacilitiesCasesProduced;

For the value 255,000 I'm expecting "2.55" however Access is rounding down
to "2.00".

How can I remedy this?

Thanks for your help!
 

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