1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Detail Line Sub Executing Twice for Line after Page Break

Discussion in 'Business Applications' started by esmerelda, Nov 4, 2009.

Thread Status:
Not open for further replies.
  1. esmerelda

    esmerelda Thread Starter

    Nov 4, 2009
    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!

    Attached Files:

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/874542

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice