Mailing Label Position

G

Guest

I'm using the following code to specify the starting position for labels to
print on a report. It works great except the starting point continues on to
each page, and instead I want it to only affect the first page of the report.
What can I add to restrict this to the first page?

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If PrintCount <= [SkipCounter] And [SkipControl] = "Skip" Then
Me.NextRecord = False
Me.PrintSection = False
Else
[SkipControl] = "No"
Me.PrintSection = True
Me.NextRecord = True
End If
End Sub

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
[SkipControl] = "Skip"
Cancel = True
End Sub
*Sorry for multiple post, general is being spammed with generated html.
 
F

fredg

I'm using the following code to specify the starting position for labels to
print on a report. It works great except the starting point continues on to
each page, and instead I want it to only affect the first page of the report.
What can I add to restrict this to the first page?

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If PrintCount <= [SkipCounter] And [SkipControl] = "Skip" Then
Me.NextRecord = False
Me.PrintSection = False
Else
[SkipControl] = "No"
Me.PrintSection = True
Me.NextRecord = True
End If
End Sub

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
[SkipControl] = "Skip"
Cancel = True
End Sub
*Sorry for multiple post, general is being spammed with generated html.

There is nothing in this code that would cause the starting label
position to carry over to the second page. I've just tried it again
and it skips label positions only on the first page.

I suspect you have used the Page Header instead of the Report Header
for the controls and the code above.

The 2 controls ([SkipCounter] and [SkipControl]) should be placed in
the Report Header and the code belongs in the Report Header Format
event, NOT the Page Header.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top