Rounding of group total

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am having a problem getting the group total to agree with the sum of the
items. The total is rounding and is .01 over or under the correct total.
Since this involves dollars it must agree.

How do I fix it?
 
Magee

You did not state what data type your underlying field holds. Rounding
errors can accumulate when you use a single or double type.

Just a thought...

Jeff Boyce
<Access MVP>
 
This is for an invoice. The amounts are defined as currency and all
discounting computations are done in an earlier query. As you can imagine it
is rather important that the total invoice match the item prices. Do you
need further info?
 
OK, maybe this will help. In the first query the fields are defined as
Standard, 2 decimals. In the table they are appened to the field is defined
as Single, Standard, 2 decimal places.

I have tried various combinations of currency and standard definitions and
cannot get the total to be accurate.

Should I be using something other than an =sum on the report>
 
Magee

As I mentioned, using Single data types (or doubles) can lead to rounding
errors.

What happens if you work with Currency data types?

Jeff Boyce
<Access MVP>

(sorry for the delay, but my "day" job expects me to show up <g>)
 
Jeff, Thank you for your replies. I had tried currency and different data
types with no change in the results. What I did to fix the problem was go
into the SQL view and use ROUND on each of the computed fields and all is
now well. This one goes my notebook for future use. Again, thanks.
 
Back
Top