Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Skipping labels while printing in Access

Status
Not open for further replies.

dkuzminski

Technical User
Jul 10, 2001
12
US
Problem is that a module in one Access database behaves properly. The same module imported into another Access database and connected to the properties "On Open" comes up, asks the question, and then fails to do what it should. Instead of skipping x number of labels, it fills out an entire sheet in the show print screen and, of course, prints them that way, too.

Here's the code:

Option Compare Database
Option Explicit

Dim LabelBlanks&
Dim BlankCount&

Function LabelSetup()
LabelBlanks& = Val(InputBox$("Enter number of labels to skip--across then down."))
If LabelBlanks& < 0 Then LabelBlanks& = 0
End Function

Function LabelInitialize()
BlankCount& = 0
End Function

Function LabelLayout(R As Report)
If BlankCount& < LabelBlanks& Then
R.NextRecord = False
R.PrintSection = False
BlankCount& = BlankCount& + 1
End If
End Function

So, any suggestions on what might not be active or why it's not working in the second database?
 
Thank you.

Still nothing happens. As a note of interest, both programs are running on the same PC using the same version of Access. I do know that the module is being called because it asks for the number of labels to skip. It's just not skipping when it reaches the form.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top