Link to home
Start Free TrialLog in
Avatar of Nancy Therrien
Nancy TherrienFlag for Canada

asked on

MS Access double total when printing

Good afternoon,
I have a problem in the fact that in my BDAccess I have a report create that sum the amount of time.
 This is working fine when I see the report on screen, but when I hit print after it has been look as preview, the Total hours have been double.  The rest of the report is still good, just the total. If I asked it to print without preview, the total is good.

I have searched a couple of days the reason why but I don't find anything.
Maybe you can help me please.

Thanks
code-print-total.txt
Avatar of PatHartman
PatHartman
Flag of United States of America image

You need to reset the accumulator.  It  accumulates the hours during the preview and then again when Access reruns the report to print it.

Is there some reason you are using code rather than functions to sum the hours.  In the section/report footer, you can add a control with the following control source to sum the data.

=Sum(yourhoursfield)
Avatar of Nancy Therrien

ASKER

hello PatHartman,

how do I reset the accumulator ?

The reason I'm doing it by code is that I have to separate mill from office hours and some hours are taken in R et D and some not.

Thanks,
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Oh ! my god you are too good.  Thanks I have putted in header print event the txt=0 and it is working.

Thanks a lot.

Nancy
thanks for fast reply.  solution is working just great !
Glad it worked for you.  Been there, done that.  But I remembered the solution:)