Re: creating a label report in access
- From: fredg <fgutkind@xxxxxxxxxxxxxxx>
- Date: Thu, 28 Aug 2008 15:10:41 -0700
On Thu, 28 Aug 2008 14:39:01 -0700, jinh wrote:
"fredg" wrote:
On Mon, 21 Feb 2005 06:41:04 -0800, Melissa wrote:
What I'm looking for is two things actually. I need to know the coding I
should use in order to create duplicate, same page labels and also how to
skip printing on certain labels. These are two seperate label reports. The
one report is for file folder labels and I do not print the whole page at one
time. I may print two labels the first time so the second time I would want
it to start printing on the third label. Any suggestions??
First make sure your label report is properly printing a full *** of
labels.
Then add a Report Header to your label report.
Add 2 text boxes to the Header.
1) Name one SkipControl
Leave it's control source unbound
2) Name the other SkipCounter
Set it control Source to =[Skip How Many?]
Now code the Report Header Format event as below:
Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As
Integer)
[SkipControl] = "Skip"
Cancel = True
End Sub
==========
Next code the Detail OnPrint event:
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
=====
When you are ready to run the label report, it will ask how many to
skip.
Then it will run the report.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Hi Fred,
I'm new to Access VBA coding. I've followed your steps above, & it still
not skipping the label. Please advice of what I should do to fix this.
Thank you in advance
Sorry, I'm here and you're there, and I can't see your report.
The above code works to skip missing label positions on a label ***.
I use it all the time.
What does your report do? Does it not skip positions at all? Does it
skip more positions than you entered? Did you add the controls to the
Report Header? Did you name those controls "SkipCounter" and
"SkipControl"? Do you get prompted for the number of labels to skip
when you run the report? Does the report work properly otherwise?
I would suggest you copy and paste into a reply message "your exact"
code, including the Private Sub ... etc.. lines.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
.
- Prev by Date: Re: Subtracting 2 Dates to List Answer in Years and Month
- Next by Date: Re: Cmd Button on Form for Filtered Report
- Previous by thread: Re: Subtracting 2 Dates to List Answer in Years and Month
- Next by thread: Re: creating a label report in access
- Index(es):
Loading