Access VBA Round Function

ions

Access User
Local time
Today, 03:00
Joined
May 23, 2004
Messages
816
My client has told me that the tax calculations on the MS Access invoice don't always match the accounting software he re-enters the data into. Sometimes the values are off by a cent or two.

I looked at how I designed the invoices and I am using the Round(x,2) function.

I just read about the peculiar behavior of the Round function here http://www.techonthenet.com/access/functions/numeric/round.php

Should I just drop the Round function and just rely on the Currency format with Decimal Places = 2? The accounting program they are using is Sage Simply Accounting. I am assuming that program uses the regular > 5 round up rule?

Thank you
 
If you use the custom rounding function by Ken Getz, as mentioned here: http://allenbrowne.com/round.html then the issue will likely go away. It fixed it in my application interfacing with some accounting s/w.
 
Thanks Spikepl,

Your link confirms that Round() uses Bankers Rounding and Ken Getz' custom function doesn't.

I also read that in Sage Simply Accounting they calculate the tax on each line item and then add it up.

I just calculate the Tax on the subtotal.

Others have had problems with this at http://community.sage50accounting.ca/COMMUNITY/forums/p/327/16809.aspx
 
Last edited:

Users who are viewing this thread

Back
Top Bottom