Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Business Applications
Tag Cloud
access audio black screen blue screen boot bsod connection crash dell desktop drivers dvd email error excel firefox hard drive hardware hijackthis internet keyboard laptop malware monitor motherboard network networking outlook problem processor ram recovery router safe mode screen slow sound spyware tdlwsp.dll trojan upgrade video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Software & Hardware > Business Applications >
Solved: Detail Line Sub Executing Twice for Line after Page Break

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

 
Thread Tools
esmerelda's Avatar
Junior Member with 3 posts.
 
Join Date: Nov 2009
04-Nov-2009, 07:29 PM #1
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!
Attached Files
File Type: zip TestDB.zip (13.4 KB, 0 views)

Last edited by esmerelda : 04-Nov-2009 07:52 PM. Reason: adding test file
Reply Bookmark and Share

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 11:14 PM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.