Printed Totals are Doubled

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

Guest

I have calculated totals in a report (using VBA). When I preview the report
the totals are correct. When I print the report they are doubled in the
report footer. I know that Access recalculates totals but what do I have to
change so that the totals are not doubled when the report is actually printed?
 
I have calculated totals in a report (using VBA). When I preview the report
the totals are correct. When I print the report they are doubled in the
report footer. I know that Access recalculates totals but what do I have to
change so that the totals are not doubled when the report is actually printed?

Set those controls to Zero in the Report Header Format event.
Me![ControlName] = 0

You would be much better off doing all of your calculations in unbound
controls in the Report's Detail Section.

Sometimes, doing math in VBA, if the section has to be re-formatted
before printing (by Access because the data won't fit in the section),
Access will not undo the calculation automatically. You'll need to
code it to do so in the section's Retreat event. There is an example
of this (if I remember correctly) in the Solutions.mdb sample database
that ships with Access.
 
Thanks, that solved my issue

fredg said:
I have calculated totals in a report (using VBA). When I preview the report
the totals are correct. When I print the report they are doubled in the
report footer. I know that Access recalculates totals but what do I have to
change so that the totals are not doubled when the report is actually printed?

Set those controls to Zero in the Report Header Format event.
Me![ControlName] = 0

You would be much better off doing all of your calculations in unbound
controls in the Report's Detail Section.

Sometimes, doing math in VBA, if the section has to be re-formatted
before printing (by Access because the data won't fit in the section),
Access will not undo the calculation automatically. You'll need to
code it to do so in the section's Retreat event. There is an example
of this (if I remember correctly) in the Solutions.mdb sample database
that ships with Access.
 
Resetting the variable may have solved it for the moment,
but keep Fred's advice in mind when you make some innocuous
change to the report and the calculation doesn't work again.
--
Marsh
MVP [MS Access]


Dan said:
Thanks, that solved my issue

fredg said:
I have calculated totals in a report (using VBA). When I preview the report
the totals are correct. When I print the report they are doubled in the
report footer. I know that Access recalculates totals but what do I have to
change so that the totals are not doubled when the report is actually printed?

Set those controls to Zero in the Report Header Format event.
Me![ControlName] = 0

You would be much better off doing all of your calculations in unbound
controls in the Report's Detail Section.

Sometimes, doing math in VBA, if the section has to be re-formatted
before printing (by Access because the data won't fit in the section),
Access will not undo the calculation automatically. You'll need to
code it to do so in the section's Retreat event. There is an example
of this (if I remember correctly) in the Solutions.mdb sample database
that ships with Access.
 
Back
Top