is this just the accumulated error when getting the Total of seven days of Royalty amounts?
Very likely so. It would be easier to answer if we could see the daily amounts.
I am making the assumption that at some point, or points, you want the result to be negotiable dollars and cents, hence only two decimal places. In cases like these my experience is that it is best to apply rounding only at the point where it is required to become a negotiable sum and thereafter work only with that figure for any subsequent calculations; otherwise you do end up with occasional quirk such as the one you have discovered. In your example, I make two brief observations:
1. If it is necessary for the royalty on each store's sales for the day ( Royalty = Round ( DaySalesNet * Stores::RateRoyalty ; 2 ) ) then you may well have a slight variation if you then seek to further round the TotalRoyalty amount (although I suspect this is merely a check you are doing here).
2. If the royalty only becomes a negotiable amount (i.e. is actually paid to someone) as a final total, then don't bother to round it along the way, just at the point where it becomes a payment. This may involve a further calculation to round the summary total.
So you are not quite right in your comment that it is an "accumulated error"; it is not an ERROR but rather the accumulated EFFECT of rounding as compared to a final rounding, which can deliver slightly different results.
Thanks for the help guys.
@Michael: sorry I left those out. I think the assumption is correct that the accumulated effect is causing the rounding issue.
@pixi: thanks for working up that solution.
@keywords: Yes, you are correct, I should have said an accumulated 'effect', not error. Your assumptions are also correct in that the amount is not 'negotiable' until the final summary. Even in that case, the on-screen/print format of the field to 2 decimal places takes care of displaying the amount correctly. I removed the 'Round' functions and am just relying on the field data formatting. Thanks.
So you are not quite right in your comment that it is an "accumulated error"; it is not an ERROR but rather the accumulated EFFECT of rounding
Well, the technical term for this "EFFECT of rounding" is round-off error, or rounding error:
touché! When I check my dictionary (book, not online) I find the term round-off error there too. So, error it is.