Only need 1 label to print on label 4 of 6...

B

Bonnie A

Hi everyone! Using A02 on XP.

We have some cd mailing labels that are 6 to a page sized 4 3/16 X 3 5/8 (no
spacing). We often have to print a label for 'just one contract' and label 1
and 6 are no brainers but we are wasting lots of labels 2, 3, 4 and 5.
(Another report prints 'ALL' for one administrator but they are emailing lots
of packages now and so need to print one or two labels at a time.)

I am not a programmer by any stretch of the imagination and so need to know
what the best way would be to accomplish this. I wondered if there is any
way to even have a query 'ask' via parameter for [Label 1 contract number],
[Label 2 contract number], etc. and if I want to print my one little label
from label position 3 I just press [Enter] through [Label 1 contract number],
and [Label 2 contract number], and for [Label 3 contract number], I can key
in GP2033 and press [Enter] through the parameters for 4, 5 and 6. Then,
when I print, I get one label printed in label position 3 of the 6 available.
I tried a query and put [Label 1 contract number], [Label 2 contract number],
etc on each of 6 criteria lines. But, when I press enter through any, I only
get the ones I actually keyed in. Only one record, only label position 1 or
6 is usable.

I hope this makes some sort of sense to someone willing to give me a little
gradeschool assistance. I can work with event procedures and some VB.

Thank you in advance for your time and assistance.
 
D

Dale Fye

Bonnie,

If you have, or can get ahold of a copy of the "Access 2000 Developer's
Handbook" (Getz, Litwin, Gilbert), it has a section "Printing Mailing Labels
Starting a a Specific Location" that gives detailed instructions on this,
including a form to select the label to start with.

But I've found an easier way. By creating a static variable in the detail
section, and simply asking (inputbox) which label to start printing on, you
can use the following code behind your form to start printing on any label.

'this goes at the top of the reports code module
Dim intStartAt As Integer

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Static LabelCount As Long
LabelCount = LabelCount + 1
If LabelCount < intStartAt Then
Me.MoveLayout = True
Me.NextRecord = False
Me.PrintSection = False
End If
End Sub

Private Sub Report_Open(Cancel As Integer)
intStartAt = InputBox("Start at which label")
End Sub

HTH
Dale

By setting the values of the fields to NULL in the second half of the Union
Query, Access will still print those values
 
L

Larry Linson

In Google groups, Advanced Search, using search words "Access" in All the
words, and the phrase "skip labels " in Exact, led immediately to a
reference to a post by Access MVP Scott Diamond at
http://en.allexperts.com/q/Using-MS-Access-1440/Skip-labels.htm, which in
turn referred to http://support.microsoft.com/kb/299024/en-us. If those
don't get the job done for you, post back with details of what you have
encountered.

Larry Linson
Microsoft Office Access MVP

P.S. I recently saw Scott at a meeting, and he's as knowledgeable and
outgoing as ever.
 
B

Bonnie A

Hi there Dale!

I had to do more than just click on the Yes button. It worked!!! I have
needed this for a number of years and each time I have inquired it was too
much to learn.

YOU ARE GREAT!!!! I truly appreciate your assistance and you have saved me
HOURS of research. I will be using this all over the place now.

Thank you again.
--
Bonnie W. Anderson
Cincinnati, OH


Dale Fye said:
Bonnie,

If you have, or can get ahold of a copy of the "Access 2000 Developer's
Handbook" (Getz, Litwin, Gilbert), it has a section "Printing Mailing Labels
Starting a a Specific Location" that gives detailed instructions on this,
including a form to select the label to start with.

But I've found an easier way. By creating a static variable in the detail
section, and simply asking (inputbox) which label to start printing on, you
can use the following code behind your form to start printing on any label.

'this goes at the top of the reports code module
Dim intStartAt As Integer

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Static LabelCount As Long
LabelCount = LabelCount + 1
If LabelCount < intStartAt Then
Me.MoveLayout = True
Me.NextRecord = False
Me.PrintSection = False
End If
End Sub

Private Sub Report_Open(Cancel As Integer)
intStartAt = InputBox("Start at which label")
End Sub

HTH
Dale

By setting the values of the fields to NULL in the second half of the Union
Query, Access will still print those values
--
Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.



Bonnie A said:
Hi everyone! Using A02 on XP.

We have some cd mailing labels that are 6 to a page sized 4 3/16 X 3 5/8 (no
spacing). We often have to print a label for 'just one contract' and label 1
and 6 are no brainers but we are wasting lots of labels 2, 3, 4 and 5.
(Another report prints 'ALL' for one administrator but they are emailing lots
of packages now and so need to print one or two labels at a time.)

I am not a programmer by any stretch of the imagination and so need to know
what the best way would be to accomplish this. I wondered if there is any
way to even have a query 'ask' via parameter for [Label 1 contract number],
[Label 2 contract number], etc. and if I want to print my one little label
from label position 3 I just press [Enter] through [Label 1 contract number],
and [Label 2 contract number], and for [Label 3 contract number], I can key
in GP2033 and press [Enter] through the parameters for 4, 5 and 6. Then,
when I print, I get one label printed in label position 3 of the 6 available.
I tried a query and put [Label 1 contract number], [Label 2 contract number],
etc on each of 6 criteria lines. But, when I press enter through any, I only
get the ones I actually keyed in. Only one record, only label position 1 or
6 is usable.

I hope this makes some sort of sense to someone willing to give me a little
gradeschool assistance. I can work with event procedures and some VB.

Thank you in advance for your time and assistance.
 
A

a_ryan1972

Dale,

I need pretty much the same thing here. Your code looks a little easier
however, I'm confused about where to put it. I currently have a button on my
form to print the report. Below is the code behind the button. I am
assuming your code would be combined with mine. Is that correct? Thank you.


Private Sub cmdPreviewReport_Click()

Me.Refresh
Dim strWhere As String

If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If

If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[ID] = " & Me.[ID]
DoCmd.OpenReport "Client Label", acViewNormal, , strWhere
End If

End Sub







Dale Fye said:
Bonnie,

If you have, or can get ahold of a copy of the "Access 2000 Developer's
Handbook" (Getz, Litwin, Gilbert), it has a section "Printing Mailing Labels
Starting a a Specific Location" that gives detailed instructions on this,
including a form to select the label to start with.

But I've found an easier way. By creating a static variable in the detail
section, and simply asking (inputbox) which label to start printing on, you
can use the following code behind your form to start printing on any label.

'this goes at the top of the reports code module
Dim intStartAt As Integer

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Static LabelCount As Long
LabelCount = LabelCount + 1
If LabelCount < intStartAt Then
Me.MoveLayout = True
Me.NextRecord = False
Me.PrintSection = False
End If
End Sub

Private Sub Report_Open(Cancel As Integer)
intStartAt = InputBox("Start at which label")
End Sub

HTH
Dale

By setting the values of the fields to NULL in the second half of the Union
Query, Access will still print those values
--
Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.



Bonnie A said:
Hi everyone! Using A02 on XP.

We have some cd mailing labels that are 6 to a page sized 4 3/16 X 3 5/8 (no
spacing). We often have to print a label for 'just one contract' and label 1
and 6 are no brainers but we are wasting lots of labels 2, 3, 4 and 5.
(Another report prints 'ALL' for one administrator but they are emailing lots
of packages now and so need to print one or two labels at a time.)

I am not a programmer by any stretch of the imagination and so need to know
what the best way would be to accomplish this. I wondered if there is any
way to even have a query 'ask' via parameter for [Label 1 contract number],
[Label 2 contract number], etc. and if I want to print my one little label
from label position 3 I just press [Enter] through [Label 1 contract number],
and [Label 2 contract number], and for [Label 3 contract number], I can key
in GP2033 and press [Enter] through the parameters for 4, 5 and 6. Then,
when I print, I get one label printed in label position 3 of the 6 available.
I tried a query and put [Label 1 contract number], [Label 2 contract number],
etc on each of 6 criteria lines. But, when I press enter through any, I only
get the ones I actually keyed in. Only one record, only label position 1 or
6 is usable.

I hope this makes some sort of sense to someone willing to give me a little
gradeschool assistance. I can work with event procedures and some VB.

Thank you in advance for your time and assistance.
 
G

Gina Whipp

This might help...

http://www.regina-whipp.com/index_files/PrintLabels.htm

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

Dale,

I need pretty much the same thing here. Your code looks a little easier
however, I'm confused about where to put it. I currently have a button on
my
form to print the report. Below is the code behind the button. I am
assuming your code would be combined with mine. Is that correct? Thank
you.


Private Sub cmdPreviewReport_Click()

Me.Refresh
Dim strWhere As String

If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If

If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[ID] = " & Me.[ID]
DoCmd.OpenReport "Client Label", acViewNormal, , strWhere
End If

End Sub







Dale Fye said:
Bonnie,

If you have, or can get ahold of a copy of the "Access 2000 Developer's
Handbook" (Getz, Litwin, Gilbert), it has a section "Printing Mailing
Labels
Starting a a Specific Location" that gives detailed instructions on this,
including a form to select the label to start with.

But I've found an easier way. By creating a static variable in the detail
section, and simply asking (inputbox) which label to start printing on,
you
can use the following code behind your form to start printing on any
label.

'this goes at the top of the reports code module
Dim intStartAt As Integer

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Static LabelCount As Long
LabelCount = LabelCount + 1
If LabelCount < intStartAt Then
Me.MoveLayout = True
Me.NextRecord = False
Me.PrintSection = False
End If
End Sub

Private Sub Report_Open(Cancel As Integer)
intStartAt = InputBox("Start at which label")
End Sub

HTH
Dale

By setting the values of the fields to NULL in the second half of the
Union
Query, Access will still print those values
--
Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.



Bonnie A said:
Hi everyone! Using A02 on XP.

We have some cd mailing labels that are 6 to a page sized 4 3/16 X 3 5/8
(no
spacing). We often have to print a label for 'just one contract' and
label 1
and 6 are no brainers but we are wasting lots of labels 2, 3, 4 and 5.
(Another report prints 'ALL' for one administrator but they are emailing
lots
of packages now and so need to print one or two labels at a time.)

I am not a programmer by any stretch of the imagination and so need to
know
what the best way would be to accomplish this. I wondered if there is
any
way to even have a query 'ask' via parameter for [Label 1 contract
number],
[Label 2 contract number], etc. and if I want to print my one little
label
from label position 3 I just press [Enter] through [Label 1 contract
number],
and [Label 2 contract number], and for [Label 3 contract number], I can
key
in GP2033 and press [Enter] through the parameters for 4, 5 and 6.
Then,
when I print, I get one label printed in label position 3 of the 6
available.
I tried a query and put [Label 1 contract number], [Label 2 contract
number],
etc on each of 6 criteria lines. But, when I press enter through any, I
only
get the ones I actually keyed in. Only one record, only label position
1 or
6 is usable.

I hope this makes some sort of sense to someone willing to give me a
little
gradeschool assistance. I can work with event procedures and some VB.

Thank you in advance for your time and assistance.
 
A

a_ryan1972

I was able to get this working, but now my problem is this. Originally I had
it so that I would entry my data into the form. When I click print client
label, I would get a label only for the client that was open in the form.

Now, I can get it to ask which label to start with, but all of the clients
are printed.

My code behind the print button is below:



Private Sub Command317_Click()
Me.Refresh


Dim strWhere As String

If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If

If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[ID] = " & Me.[ID]
DoCmd.OpenReport "Client Label", acViewNormal, , strWhere
End If
End Sub





Gina Whipp said:
This might help...

http://www.regina-whipp.com/index_files/PrintLabels.htm

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

Dale,

I need pretty much the same thing here. Your code looks a little easier
however, I'm confused about where to put it. I currently have a button on
my
form to print the report. Below is the code behind the button. I am
assuming your code would be combined with mine. Is that correct? Thank
you.


Private Sub cmdPreviewReport_Click()

Me.Refresh
Dim strWhere As String

If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If

If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[ID] = " & Me.[ID]
DoCmd.OpenReport "Client Label", acViewNormal, , strWhere
End If

End Sub







Dale Fye said:
Bonnie,

If you have, or can get ahold of a copy of the "Access 2000 Developer's
Handbook" (Getz, Litwin, Gilbert), it has a section "Printing Mailing
Labels
Starting a a Specific Location" that gives detailed instructions on this,
including a form to select the label to start with.

But I've found an easier way. By creating a static variable in the detail
section, and simply asking (inputbox) which label to start printing on,
you
can use the following code behind your form to start printing on any
label.

'this goes at the top of the reports code module
Dim intStartAt As Integer

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Static LabelCount As Long
LabelCount = LabelCount + 1
If LabelCount < intStartAt Then
Me.MoveLayout = True
Me.NextRecord = False
Me.PrintSection = False
End If
End Sub

Private Sub Report_Open(Cancel As Integer)
intStartAt = InputBox("Start at which label")
End Sub

HTH
Dale

By setting the values of the fields to NULL in the second half of the
Union
Query, Access will still print those values
--
Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.



Bonnie A said:
Hi everyone! Using A02 on XP.

We have some cd mailing labels that are 6 to a page sized 4 3/16 X 3 5/8
(no
spacing). We often have to print a label for 'just one contract' and
label 1
and 6 are no brainers but we are wasting lots of labels 2, 3, 4 and 5.
(Another report prints 'ALL' for one administrator but they are emailing
lots
of packages now and so need to print one or two labels at a time.)

I am not a programmer by any stretch of the imagination and so need to
know
what the best way would be to accomplish this. I wondered if there is
any
way to even have a query 'ask' via parameter for [Label 1 contract
number],
[Label 2 contract number], etc. and if I want to print my one little
label
from label position 3 I just press [Enter] through [Label 1 contract
number],
and [Label 2 contract number], and for [Label 3 contract number], I can
key
in GP2033 and press [Enter] through the parameters for 4, 5 and 6.
Then,
when I print, I get one label printed in label position 3 of the 6
available.
I tried a query and put [Label 1 contract number], [Label 2 contract
number],
etc on each of 6 criteria lines. But, when I press enter through any, I
only
get the ones I actually keyed in. Only one record, only label position
1 or
6 is usable.

I hope this makes some sort of sense to someone willing to give me a
little
gradeschool assistance. I can work with event procedures and some VB.

Thank you in advance for your time and assistance.

.
 
G

Gina Whipp

a_ryan1972,

1. Changed your code slightly... Is the Me.ID a field on your form? And
did you fill in the information in the Report sections as specified on the
web page, as well as, the line of criteria for the query attached to the
report?

Private Sub Command317_Click()
Me.Refresh


If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If

If IsNull([ID]) Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
DoCmd.OpenReport "Client Label", acViewNormal, , "[ID] = " & Me.[ID]
End If
End Sub


--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

I was able to get this working, but now my problem is this. Originally I
had
it so that I would entry my data into the form. When I click print client
label, I would get a label only for the client that was open in the form.

Now, I can get it to ask which label to start with, but all of the clients
are printed.

My code behind the print button is below:



Private Sub Command317_Click()
Me.Refresh


Dim strWhere As String

If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If

If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[ID] = " & Me.[ID]
DoCmd.OpenReport "Client Label", acViewNormal, , strWhere
End If
End Sub





Gina Whipp said:
This might help...

http://www.regina-whipp.com/index_files/PrintLabels.htm

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

Dale,

I need pretty much the same thing here. Your code looks a little easier
however, I'm confused about where to put it. I currently have a button on
my
form to print the report. Below is the code behind the button. I am
assuming your code would be combined with mine. Is that correct? Thank
you.


Private Sub cmdPreviewReport_Click()

Me.Refresh
Dim strWhere As String

If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If

If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[ID] = " & Me.[ID]
DoCmd.OpenReport "Client Label", acViewNormal, , strWhere
End If

End Sub







Dale Fye said:
Bonnie,

If you have, or can get ahold of a copy of the "Access 2000 Developer's
Handbook" (Getz, Litwin, Gilbert), it has a section "Printing Mailing
Labels
Starting a a Specific Location" that gives detailed instructions on
this,
including a form to select the label to start with.

But I've found an easier way. By creating a static variable in the
detail
section, and simply asking (inputbox) which label to start printing on,
you
can use the following code behind your form to start printing on any
label.

'this goes at the top of the reports code module
Dim intStartAt As Integer

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Static LabelCount As Long
LabelCount = LabelCount + 1
If LabelCount < intStartAt Then
Me.MoveLayout = True
Me.NextRecord = False
Me.PrintSection = False
End If
End Sub

Private Sub Report_Open(Cancel As Integer)
intStartAt = InputBox("Start at which label")
End Sub

HTH
Dale

By setting the values of the fields to NULL in the second half of the
Union
Query, Access will still print those values
--
Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.



Bonnie A said:
Hi everyone! Using A02 on XP.

We have some cd mailing labels that are 6 to a page sized 4 3/16 X 3
5/8
(no
spacing). We often have to print a label for 'just one contract' and
label 1
and 6 are no brainers but we are wasting lots of labels 2, 3, 4 and 5.
(Another report prints 'ALL' for one administrator but they are
emailing
lots
of packages now and so need to print one or two labels at a time.)

I am not a programmer by any stretch of the imagination and so need to
know
what the best way would be to accomplish this. I wondered if there is
any
way to even have a query 'ask' via parameter for [Label 1 contract
number],
[Label 2 contract number], etc. and if I want to print my one little
label
from label position 3 I just press [Enter] through [Label 1 contract
number],
and [Label 2 contract number], and for [Label 3 contract number], I
can
key
in GP2033 and press [Enter] through the parameters for 4, 5 and 6.
Then,
when I print, I get one label printed in label position 3 of the 6
available.
I tried a query and put [Label 1 contract number], [Label 2 contract
number],
etc on each of 6 criteria lines. But, when I press enter through any,
I
only
get the ones I actually keyed in. Only one record, only label
position
1 or
6 is usable.

I hope this makes some sort of sense to someone willing to give me a
little
gradeschool assistance. I can work with event procedures and some VB.

Thank you in advance for your time and assistance.

.
 

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