Error when report is printed from preview view (1 Viewer)

billyr

Registered User.
Local time
Today, 11:45
Joined
May 25, 2003
Messages
123
My application has a report manager form that allows the user to open a report in preview or print mode (via command buttons and code). On one report, if the user opens the report in preview and clicks the windows print button from that view, a footer print event calculation seems to re-iterate doubling its value. If she just clicks my print button, the value printed is correct. Here is the code in the footer print event:

Private Sub GroupFooter1_Print(Cancel As Integer, PrintCount As Integer)
If Me.Text51 <> "N/A" Then
grandtotalBushels = grandtotalBushels + Me.Text51
End If
End Sub

Text51 contains the calculated bushels value for each grouping item and grandtotalBushels is accumulated for the report footer. I recall having trouble with this accumulation and could only get it to work by updating it in the group print event. For now, I can tell the user to use my form's Print button to print the report; but, I would sure like to know how to fix the bug. (I know I am going to feel dumb.) Thanks for your help.
 

Users who are viewing this thread

Top Bottom