Totals getting doubles

  • Thread starter Thread starter Bob Howard
  • Start date Start date
B

Bob Howard

Using Access 2003, my application has about 30 reports.

But I have 2 reports where my totals are getting doubled. I accumulate the
totals in the Format event for the detail lines, and only do so when
FormatCount=1.

I print the totals in a report footer.

Again, I get precisely double the correct amount. I implemented a special
bypass in one of the reports where I can detect if I come thru more than
once with FormatCount=1, and I'm able to cope with this situation in that
case.

But I shouldn't have to do that.

Any clues??

bob
 
It all starts with the data... and I'm not too clear on your data yet.

What does the query look like that you're using?

--

Regards

Jeff Boyce
Microsoft Access MVP

Disclaimer: This author may have received products and services mentioned in
this post. Mention and/or description of a product or service herein does
not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
And please tell us why you think you need to use code to create sums.
Typically this should be a no-code operation.
 
The calculations are extremely complex ... not purely adding numbers
together. But the errors I'm seeing are coming from most of the detail
records being processed twice.

I did find some references on some discussion groups that the FormatCount is
not reliable when you have "Keep Together" property specified at the group
level (not in any report control, but in the group specification). Indeed,
when I change "Whole Group" to "No" the calculations are correct! I just
discovered this (after I posted my initial problem).

But I cannot understand how Microsoft can give us the ability to test the
FormatCount and then tell us that it's not reliable. may as well totally
ignore it!

bob
 
I always find a way to use the simple Sum(). Sometimes this requires creating
a small function or something but it avoids the issue you seem to be having.
 
Back
Top