Repeat Label Varied Amount of times

G

Guest

I am trying to make a label report and have it that specific label repeat
according to how many of that item are on order. The number will change from
record to record for the amount of times. I already know how to make it
repeat a fixed number of times.
 
D

Duane Hookom

You can create a table of all numbers (tblNums.Num). Add this table to your
report's record source and set the criteria under tblNum.Num to
<=[QuantityField]
 
G

Guest

Do you know of any good website to find more speciific instructions on doing
this

Duane Hookom said:
You can create a table of all numbers (tblNums.Num). Add this table to your
report's record source and set the criteria under tblNum.Num to
<=[QuantityField]

--
Duane Hookom
MS Access MVP


Ben said:
I am trying to make a label report and have it that specific label repeat
according to how many of that item are on order. The number will change
from
record to record for the amount of times. I already know how to make it
repeat a fixed number of times.
 
D

Duane Hookom

Not really, If you have a question about this solution, just ask.

--
Duane Hookom
MS Access MVP


Ben said:
Do you know of any good website to find more speciific instructions on
doing
this

Duane Hookom said:
You can create a table of all numbers (tblNums.Num). Add this table to
your
report's record source and set the criteria under tblNum.Num to
<=[QuantityField]

--
Duane Hookom
MS Access MVP


Ben said:
I am trying to make a label report and have it that specific label
repeat
according to how many of that item are on order. The number will
change
from
record to record for the amount of times. I already know how to make
it
repeat a fixed number of times.
 
G

Guest

I pretty good with access but I am not understanding you. If you would
prefere to email me my emai li (e-mail address removed)

Duane Hookom said:
Not really, If you have a question about this solution, just ask.

--
Duane Hookom
MS Access MVP


Ben said:
Do you know of any good website to find more speciific instructions on
doing
this

Duane Hookom said:
You can create a table of all numbers (tblNums.Num). Add this table to
your
report's record source and set the criteria under tblNum.Num to
<=[QuantityField]

--
Duane Hookom
MS Access MVP


I am trying to make a label report and have it that specific label
repeat
according to how many of that item are on order. The number will
change
from
record to record for the amount of times. I already know how to make
it
repeat a fixed number of times.
 
D

Duane Hookom

Just tell us exactly what you have for records and how you would like these
displayed in your report.

I prefer to keep communication in the news group and off the clock.

--
Duane Hookom
MS Access MVP


Ben said:
I pretty good with access but I am not understanding you. If you would
prefere to email me my emai li (e-mail address removed)

Duane Hookom said:
Not really, If you have a question about this solution, just ask.

--
Duane Hookom
MS Access MVP


Ben said:
Do you know of any good website to find more speciific instructions on
doing
this

:

You can create a table of all numbers (tblNums.Num). Add this table to
your
report's record source and set the criteria under tblNum.Num to
<=[QuantityField]

--
Duane Hookom
MS Access MVP


I am trying to make a label report and have it that specific label
repeat
according to how many of that item are on order. The number will
change
from
record to record for the amount of times. I already know how to
make
it
repeat a fixed number of times.
 
G

Guest

I have a database of records of different items that I am ordering and I have
different amounts of each item that I would like to order. I would like to
print a label to place on the out side of each item to identify its contents.
If I have 6 of one item I need 6 copies of that idividual label, and it i
want 15 of another item then I am going to need 15 copies of that label with
its information also. I am trying to have this all done in the same report.
To make it real simple in my table i have a column that has the amount of
copies of the label I need to have. I just need to tell the report to repeat
it that amount of time acording to that number in the column. But the
number is not a constant in the report.

Duane Hookom said:
Just tell us exactly what you have for records and how you would like these
displayed in your report.

I prefer to keep communication in the news group and off the clock.

--
Duane Hookom
MS Access MVP


Ben said:
I pretty good with access but I am not understanding you. If you would
prefere to email me my emai li (e-mail address removed)

Duane Hookom said:
Not really, If you have a question about this solution, just ask.

--
Duane Hookom
MS Access MVP


Do you know of any good website to find more speciific instructions on
doing
this

:

You can create a table of all numbers (tblNums.Num). Add this table to
your
report's record source and set the criteria under tblNum.Num to
<=[QuantityField]

--
Duane Hookom
MS Access MVP


I am trying to make a label report and have it that specific label
repeat
according to how many of that item are on order. The number will
change
from
record to record for the amount of times. I already know how to
make
it
repeat a fixed number of times.
 
D

Duane Hookom

Create a table of numbers (tblNums) with a numeric long field (Num) and add
values 1 through your maximum of [AmountOfCopies].
Open your report in design view and find the Record Source property. Open
this property in the query designer and add the tblNums table.

Then add the Num field to the query grid and set the criteria under the Num
field to:
<=[AmountOfCopies]
Substitute your field name for AmountOfCopies.

--
Duane Hookom
MS Access MVP
--

Ben said:
I have a database of records of different items that I am ordering and I
have
different amounts of each item that I would like to order. I would like
to
print a label to place on the out side of each item to identify its
contents.
If I have 6 of one item I need 6 copies of that idividual label, and it i
want 15 of another item then I am going to need 15 copies of that label
with
its information also. I am trying to have this all done in the same
report.
To make it real simple in my table i have a column that has the amount of
copies of the label I need to have. I just need to tell the report to
repeat
it that amount of time acording to that number in the column. But the
number is not a constant in the report.

Duane Hookom said:
Just tell us exactly what you have for records and how you would like
these
displayed in your report.

I prefer to keep communication in the news group and off the clock.

--
Duane Hookom
MS Access MVP


Ben said:
I pretty good with access but I am not understanding you. If you would
prefere to email me my emai li (e-mail address removed)

:

Not really, If you have a question about this solution, just ask.

--
Duane Hookom
MS Access MVP


Do you know of any good website to find more speciific instructions
on
doing
this

:

You can create a table of all numbers (tblNums.Num). Add this table
to
your
report's record source and set the criteria under tblNum.Num to
<=[QuantityField]

--
Duane Hookom
MS Access MVP


I am trying to make a label report and have it that specific label
repeat
according to how many of that item are on order. The number will
change
from
record to record for the amount of times. I already know how to
make
it
repeat a fixed number of times.
 
M

Marshall Barton

Xed said:
Alternatively, use a counter to keep track of the number of times you;ve
printed the label; compare that with the number of times it needs to be
printed and if the number to be printed is not yet exceeded then simply
set the *NextRecord* method to be False.

For example:
<Declarations>
Dim lngCount as Long

Private Sub Detail_Print(Cancel as Integer, FormatCount As Integer)
If lngCount>=Me![-*NumItems*-] Then
Me.NextRecord = False
lngCount = lngCount + 1
Else
lngCount = 0
End If
End Sub
-*Note: *NumItems is the field within your recordset/query that has the
number of items on order-

This will simply repeat the Detail section of your report, and hence
the label, the number of times the record indicates. I've used
-NumItems- for the field in the query that contains the order item
count, simply change this for your field name.


That might work under the right circumstances, but there is
no guarantee. Report event procedures are executed in a
non-sequential, as needed, order so you have little or no
control over the actual number of duplicate labels (it
**might** generate and extra every now and then). Even if
you do get it to work in a specific case, a later, small and
seemingly trivial change can upset the apple cart.
 
G

Guest

It is not working I have pasted it into the code editor but it still does not
work it does not work when i put it into the on format command i have tried
Xed said:
Alternatively, use a counter to keep track of the number of times you;ve
printed the label; compare that with the number of times it needs to be
printed and if the number to be printed is not yet exceeded then simply
set the *NextRecord* method to be False.

For example:
<Declarations>
Dim lngCount as Long

Private Sub Detail_Print(Cancel as Integer, FormatCount As Integer)
If lngCount>=Me![-*NumItems*-] Then
Me.NextRecord = False
lngCount = lngCount + 1
Else
lngCount = 0
End If
End Sub
-*Note: *NumItems is the field within your recordset/query that has the
number of items on order-

This will simply repeat the Detail section of your report, and hence
the label, the number of times the record indicates. I've used
-NumItems- for the field in the query that contains the order item
count, simply change this for your field name.


That might work under the right circumstances, but there is
no guarantee. Report event procedures are executed in a
non-sequential, as needed, order so you have little or no
control over the actual number of duplicate labels (it
**might** generate and extra every now and then). Even if
you do get it to work in a specific case, a later, small and
seemingly trivial change can upset the apple cart.
 
D

Duane Hookom

Not sure why you are using a code method when there is a no-code method that
is much simpler and works great. Did you try the solution I suggested?

--
Duane Hookom
MS Access MVP
--

Ben said:
It is not working I have pasted it into the code editor but it still does
not
work it does not work when i put it into the on format command i have
tried
Xed said:
Alternatively, use a counter to keep track of the number of times you;ve
printed the label; compare that with the number of times it needs to be
printed and if the number to be printed is not yet exceeded then simply
set the *NextRecord* method to be False.

For example:
<Declarations>
Dim lngCount as Long

Private Sub Detail_Print(Cancel as Integer, FormatCount As Integer)
If lngCount>=Me![-*NumItems*-] Then
Me.NextRecord = False
lngCount = lngCount + 1
Else
lngCount = 0
End If
End Sub
-*Note: *NumItems is the field within your recordset/query that has the
number of items on order-

This will simply repeat the Detail section of your report, and hence
the label, the number of times the record indicates. I've used
-NumItems- for the field in the query that contains the order item
count, simply change this for your field name.


That might work under the right circumstances, but there is
no guarantee. Report event procedures are executed in a
non-sequential, as needed, order so you have little or no
control over the actual number of duplicate labels (it
**might** generate and extra every now and then). Even if
you do get it to work in a specific case, a later, small and
seemingly trivial change can upset the apple cart.
 
G

Guest

Yes I did I copy and pasted the code you typed in for me inthe visual basic
editor under the on format command. Did I do this wrong. Am I not suppose
to be using it as code is thier another method of doing it.

Duane Hookom said:
Not sure why you are using a code method when there is a no-code method that
is much simpler and works great. Did you try the solution I suggested?

--
Duane Hookom
MS Access MVP
--

Ben said:
It is not working I have pasted it into the code editor but it still does
not
work it does not work when i put it into the on format command i have
tried
Xed wrote:
Alternatively, use a counter to keep track of the number of times you;ve
printed the label; compare that with the number of times it needs to be
printed and if the number to be printed is not yet exceeded then simply
set the *NextRecord* method to be False.

For example:
<Declarations>
Dim lngCount as Long

Private Sub Detail_Print(Cancel as Integer, FormatCount As Integer)
If lngCount>=Me![-*NumItems*-] Then
Me.NextRecord = False
lngCount = lngCount + 1
Else
lngCount = 0
End If
End Sub
-*Note: *NumItems is the field within your recordset/query that has the
number of items on order-

This will simply repeat the Detail section of your report, and hence
the label, the number of times the record indicates. I've used
-NumItems- for the field in the query that contains the order item
count, simply change this for your field name.


That might work under the right circumstances, but there is
no guarantee. Report event procedures are executed in a
non-sequential, as needed, order so you have little or no
control over the actual number of duplicate labels (it
**might** generate and extra every now and then). Even if
you do get it to work in a specific case, a later, small and
seemingly trivial change can upset the apple cart.
 
D

Duane Hookom

I didn't provide any code. My suggested involved a table and some SQL. There
was no code to paste anywhere.

--
Duane Hookom
MS Access MVP


Ben said:
Yes I did I copy and pasted the code you typed in for me inthe visual
basic
editor under the on format command. Did I do this wrong. Am I not
suppose
to be using it as code is thier another method of doing it.

Duane Hookom said:
Not sure why you are using a code method when there is a no-code method
that
is much simpler and works great. Did you try the solution I suggested?

--
Duane Hookom
MS Access MVP
--

Ben said:
It is not working I have pasted it into the code editor but it still
does
not
work it does not work when i put it into the on format command i have
tried
on open and on print but no results

:

Xed wrote:
Alternatively, use a counter to keep track of the number of times
you;ve
printed the label; compare that with the number of times it needs to
be
printed and if the number to be printed is not yet exceeded then
simply
set the *NextRecord* method to be False.

For example:
<Declarations>
Dim lngCount as Long

Private Sub Detail_Print(Cancel as Integer, FormatCount As Integer)
If lngCount>=Me![-*NumItems*-] Then
Me.NextRecord = False
lngCount = lngCount + 1
Else
lngCount = 0
End If
End Sub
-*Note: *NumItems is the field within your recordset/query that has
the
number of items on order-

This will simply repeat the Detail section of your report, and hence
the label, the number of times the record indicates. I've used
-NumItems- for the field in the query that contains the order item
count, simply change this for your field name.


That might work under the right circumstances, but there is
no guarantee. Report event procedures are executed in a
non-sequential, as needed, order so you have little or no
control over the actual number of duplicate labels (it
**might** generate and extra every now and then). Even if
you do get it to work in a specific case, a later, small and
seemingly trivial change can upset the apple cart.
 

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