A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

creating a label report in access



 
 
Thread Tools Display Modes
  #1  
Old February 21st, 2005, 02:41 PM
Melissa
external usenet poster
 
Posts: n/a
Default creating a label report in access

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??
  #2  
Old February 21st, 2005, 07:02 PM
fredg
external usenet poster
 
Posts: n/a
Default

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 sheet 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.
  #3  
Old February 22nd, 2005, 02:27 PM
Melissa
external usenet poster
 
Posts: n/a
Default

Thanks Fred, that worked for skipping labels...any suggestions on printing
duplicate same page labels??

"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 sheet 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.

  #4  
Old February 22nd, 2005, 05:23 PM
fredg
external usenet poster
 
Posts: n/a
Default

On Tue, 22 Feb 2005 06:27:02 -0800, Melissa wrote:

Thanks Fred, that worked for skipping labels...any suggestions on printing
duplicate same page labels??

"fredg" wrote:

*** snipped ***


There are several different methods. Here is one that combines the
skip missing labels with repeating them.

This will permit you to enter the number of times to repeat the
labels, as well as skip missing label positions on an already used
sheet.

First make sure your label report properly prints 1 label per record.

Then add a Report Header to the label report.
Add 3 unbound text boxes to the header.
1) Set the Control Source to:
= [Skip how many]
Name this control SkipCounter
2) Leave the second control unbound.
Name this control SkipControl
3) Set the third control's Control Source to:
=[Repeat how many]
Name it RepeatCounter

Next code the Report Header OnFormat event:

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As
Integer)
[SkipControl] = "Skip"
Cancel = True
End Sub
=======
Now code the Detail OnPrint Event:
(Note that intMyPrint is Static!!)

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Static intMyPrint As Integer
If PrintCount = [SkipCounter] And [SkipControl] = "Skip" Then
Me.NextRecord = False
Me.PrintSection = False
intMyPrint = 0
Else
[SkipControl] = "No"
Me.PrintSection = True
Me.NextRecord = True
intMyPrint = intMyPrint + 1
If IsNull([RepeatCounter]) Then
ElseIf intMyPrint Mod [RepeatCounter] = 0 Then
Me.NextRecord = True
intMyPrint = 0
Else
Me.NextRecord = False
End If
End If

End Sub
=========

When you run the report, it will ask how many labels to skip, then how
many times to repeat each label.


--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
  #5  
Old October 6th, 2008, 03:34 PM posted to microsoft.public.access.reports
jinh
external usenet poster
 
Posts: 14
Default creating a label report in access

Hi Fred,

It's me again. Once again thanks for sharing your wonderful codings.

Anyway, I was trying to work on the Printing Duplicate Label on the same
page, & I got this debugging error which I have no idea how to fix it.

The error message says "Microsoft Office Access can't find the field "I"
refered to in your expression", & when I click on the Debug button it toke me
to the line where it coded as "If IsNull([RepeatCounter]) Then".

Any idea what I can do to fix this error?

Thanks in advance Fred!

JH


"fredg" wrote:

On Tue, 22 Feb 2005 06:27:02 -0800, Melissa wrote:

Thanks Fred, that worked for skipping labels...any suggestions on printing
duplicate same page labels??

"fredg" wrote:

*** snipped ***


There are several different methods. Here is one that combines the
skip missing labels with repeating them.

This will permit you to enter the number of times to repeat the
labels, as well as skip missing label positions on an already used
sheet.

First make sure your label report properly prints 1 label per record.

Then add a Report Header to the label report.
Add 3 unbound text boxes to the header.
1) Set the Control Source to:
= [Skip how many]
Name this control SkipCounter
2) Leave the second control unbound.
Name this control SkipControl
3) Set the third control's Control Source to:
=[Repeat how many]
Name it RepeatCounter

Next code the Report Header OnFormat event:

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As
Integer)
[SkipControl] = "Skip"
Cancel = True
End Sub
=======
Now code the Detail OnPrint Event:
(Note that intMyPrint is Static!!)

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Static intMyPrint As Integer
If PrintCount = [SkipCounter] And [SkipControl] = "Skip" Then
Me.NextRecord = False
Me.PrintSection = False
intMyPrint = 0
Else
[SkipControl] = "No"
Me.PrintSection = True
Me.NextRecord = True
intMyPrint = intMyPrint + 1
If IsNull([RepeatCounter]) Then
ElseIf intMyPrint Mod [RepeatCounter] = 0 Then
Me.NextRecord = True
intMyPrint = 0
Else
Me.NextRecord = False
End If
End If

End Sub
=========

When you run the report, it will ask how many labels to skip, then how
many times to repeat each label.


--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.

  #6  
Old October 6th, 2008, 03:59 PM posted to microsoft.public.access.reports
jinh
external usenet poster
 
Posts: 14
Default creating a label report in access

Hi Fred,

Don't worry about my last post, it's my own issue. I had a typo in my code.
Sorry about that.

Thanks anyway!
JH

"fredg" wrote:

On Tue, 22 Feb 2005 06:27:02 -0800, Melissa wrote:

Thanks Fred, that worked for skipping labels...any suggestions on printing
duplicate same page labels??

"fredg" wrote:

*** snipped ***


There are several different methods. Here is one that combines the
skip missing labels with repeating them.

This will permit you to enter the number of times to repeat the
labels, as well as skip missing label positions on an already used
sheet.

First make sure your label report properly prints 1 label per record.

Then add a Report Header to the label report.
Add 3 unbound text boxes to the header.
1) Set the Control Source to:
= [Skip how many]
Name this control SkipCounter
2) Leave the second control unbound.
Name this control SkipControl
3) Set the third control's Control Source to:
=[Repeat how many]
Name it RepeatCounter

Next code the Report Header OnFormat event:

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As
Integer)
[SkipControl] = "Skip"
Cancel = True
End Sub
=======
Now code the Detail OnPrint Event:
(Note that intMyPrint is Static!!)

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Static intMyPrint As Integer
If PrintCount = [SkipCounter] And [SkipControl] = "Skip" Then
Me.NextRecord = False
Me.PrintSection = False
intMyPrint = 0
Else
[SkipControl] = "No"
Me.PrintSection = True
Me.NextRecord = True
intMyPrint = intMyPrint + 1
If IsNull([RepeatCounter]) Then
ElseIf intMyPrint Mod [RepeatCounter] = 0 Then
Me.NextRecord = True
intMyPrint = 0
Else
Me.NextRecord = False
End If
End If

End Sub
=========

When you run the report, it will ask how many labels to skip, then how
many times to repeat each label.


--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.

  #7  
Old August 28th, 2008, 10:39 PM posted to microsoft.public.access.reports
jinh
external usenet poster
 
Posts: 14
Default creating a label report in access



"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 sheet 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
  #8  
Old August 28th, 2008, 11:10 PM posted to microsoft.public.access.reports
fredg
external usenet poster
 
Posts: 4,386
Default creating a label report in access

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 sheet 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 sheet.
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
  #9  
Old August 28th, 2008, 11:48 PM posted to microsoft.public.access.reports
jinh
external usenet poster
 
Posts: 14
Default creating a label report in access



"fredg" wrote:

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 sheet 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 sheet.
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


Sorry Fred,

First, I like to thank you for you quick respond. That's really nice of you.

Anyway, I tried both copying your codes over & I've tried to type in by
myself. What it is doing is when I run the report, it'll ask for skip how
many. I typed in 1 & the report just print at the 0 position. Here is the
code:

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

  #10  
Old August 29th, 2008, 12:45 AM posted to microsoft.public.access.reports
fredg
external usenet poster
 
Posts: 4,386
Default creating a label report in access

*** snipped ***

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 sheet.
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


Sorry Fred,

First, I like to thank you for you quick respond. That's really nice of you.

Anyway, I tried both copying your codes over & I've tried to type in by
myself. What it is doing is when I run the report, it'll ask for skip how
many. I typed in 1 & the report just print at the 0 position. Here is the
code:

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


I just copied and pasted this code, exactly as you sent it to me, into
a label report. It works just fine.

I'll have to re-iterate my question to you from the previous post...
Did you add the 2 controls to the REPORT HEADER?
Did you name those controls "SkipCounter" and "SkipControl"?
Did you leave the Control Source of [SkipControl] blank?

Now I'll add..
What happens if you enter 5 to skip instead of 1?

Check Report Header Format and the Detail Print event lines (on the
property sheet). Does that line on the property sheet say
[Event Procedure]? It should. *** After thinking about it, I think
this is the most likely problem.

Did you try setting a breakpoint in the code, stepping through the
code one line at a time, to read the values of
SkipCounter and [SkipControl]
to see what those values are as the report is running?

In any event, the code is fine so it must be something else you have
or have not done.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
from a FORM print a label report 3 labels per sheet for CURRENT re babs Setting Up & Running Reports 7 February 6th, 2005 06:38 PM
exporting accress reports into word marc General Discussion 8 December 29th, 2004 04:40 PM
Save Report With CreateReport Coding Issue Jeff Conrad Setting Up & Running Reports 8 July 12th, 2004 08:39 AM
OT- label making Erika Publisher 4 May 26th, 2004 06:27 AM


All times are GMT +1. The time now is 11:14 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.