Solved: Detail Line Sub Executing Twice for Line after Page Break I have Access 93 SP2.
I have a report where I am doing calculations on each row of data in the Sub Detail_Print. What is happening is that the detail line that is to print on the top of the 2nd page and any detail line to print first on subsequent pages is having this routine executed twice.
I have created the smallest possible report which simply selects a list of order numbers. The only section is the Detail. The only line in the Sub Detail_Print is
MsgBox "OrderNumber is" & Me.OrderNumber
In Preview, I see a msgbox for each line then the ordernumber that should print at the top of the second page shows its msgbox, the first page appears, when I click the arrow to go to the next page the same msgbox appears again.
It appears that Access gets the line, executes the code, decides it doesn't fit on that page, does the new page, regets the line and re-executes the code placing it on the new page.
I could find nothing on this anywhere. Has anyone else seen this? Is there some setting I am missing?
Thank you!
Last edited by esmerelda : 04-Nov-2009 07:52 PM.
Reason: adding test file
|