Rounding

G

Guest

Hi all

I know this is a problem with Access but I'm not sure how to sort it. I have
expense records that have the total entered and a VAT rate (default being
1.175) by the user. In my queries calculations are performed to work out Net
and VAT amounts, if applicable - not all are vatable. Access automatically
rounds the numbers eg 1.235 becomes 1.24. I have another query sat on top of
this which groups and sums the amounts. The sum of VAT is 0.05 above what the
VAT should be if calculated on the sum of Amount. I have to calculate the VAT
seperately though with each line not being the same rate.

Is there a way to sort this? Do I need to use the round function I've seen
mentioned in some posts?

Thanks for any help.
Kind Regards
Sue
 
A

Arvin Meyer [MVP]

hughess7 said:
Is there a way to sort this? Do I need to use the round function I've seen
mentioned in some posts?

I would suggest that you use a custom rounding function, if the average is
off by more than a few hundreths. The built-in one, and the currency
datatype only round the display, which is what is causing your problem.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
G

Guest

I was using the format fixed on the VAT column in my query, in experimenting
I removed this (so no rounding took place) and it adds up ok now.
 

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