printing labels

L

lynette

hi, i have a form with a subform and want to print labels
containing info from both forms. The user determines the
number of labels to be printed for each record.

Example:

Form A
TransactionNo = Primarykey Table A (autono)
TranDate
Print Label = command button
Subform B
Product = Primarykey Table B
#Labels = X no of labels to be printed for this record

*(this form works just like the Order Entry form of
Northwind database where multiple products can be entered
under one transaction no)

I am using the module below that i found in the web. The
only problem is it prints labels for all transactions.
furthermore, i cannot put a criteria in the underlying
query for other reports are also based on it. Is there a
way to just modify the module below to that it only prints
labels for the current transaction? Or should i just
create a new query for this purpose?

any suggestion on how to accomplish this task will be
greatly appreciated.

thanks for your reply...

Label Module:

Option Compare Database
Option Explicit

Dim LabelBlanks&
Dim BlankCount&
Dim CopyCount&

Function LabelSetup()
LabelBlanks& = Val(InputBox$("Enter Number of blank
labels to skip"))
If LabelBlanks& < 0 Then LabelBlanks& = 0

End Function

Function LabelInitialize()
BlankCount& = 0
CopyCount& = 0
End Function

Function LabelLayout(R As Report)
If BlankCount& < LabelBlanks& Then
R.NextRecord = False
R.PrintSection = False
BlankCount& = BlankCount& + 1
Else
If CopyCount& < (Reports!Labels![Labels] - 1) Then
R.NextRecord = False
CopyCount& = CopyCount& + 1
Else
CopyCount& = 0
End If
End If
End Function
 
G

Guest

thanks for taking time to reply to my posting.

yup! you're indeed right. i guess that's what i need to
do. i was just hoping that there's a simplier way of
doing it.

thanks again!

-----Original Message-----
When I make reports (or labels) I normally create the
query as part of the report design. This eliminates the
possibility that I may modify a query and mess up some
other report or form depending on a query created external
to the report or form.
I think if you take that approach you will be able to do
what you described below.
Hope this helps.
Fons
-----Original Message-----
hi, i have a form with a subform and want to print labels
containing info from both forms. The user determines the
number of labels to be printed for each record.

Example:

Form A
TransactionNo = Primarykey Table A (autono)
TranDate
Print Label = command button
Subform B
Product = Primarykey Table B
#Labels = X no of labels to be printed for this record

*(this form works just like the Order Entry form of
Northwind database where multiple products can be entered
under one transaction no)

I am using the module below that i found in the web. The
only problem is it prints labels for all transactions.
furthermore, i cannot put a criteria in the underlying
query for other reports are also based on it. Is there a
way to just modify the module below to that it only prints
labels for the current transaction? Or should i just
create a new query for this purpose?

any suggestion on how to accomplish this task will be
greatly appreciated.

thanks for your reply...

Label Module:

Option Compare Database
Option Explicit

Dim LabelBlanks&
Dim BlankCount&
Dim CopyCount&

Function LabelSetup()
LabelBlanks& = Val(InputBox$("Enter Number of blank
labels to skip"))
If LabelBlanks& < 0 Then LabelBlanks& = 0

End Function

Function LabelInitialize()
BlankCount& = 0
CopyCount& = 0
End Function

Function LabelLayout(R As Report)
If BlankCount& < LabelBlanks& Then
R.NextRecord = False
R.PrintSection = False
BlankCount& = BlankCount& + 1
Else
If CopyCount& < (Reports!Labels![Labels] - 1) Then
R.NextRecord = False
CopyCount& = CopyCount& + 1
Else
CopyCount& = 0
End If
End If
End Function

.
.
 

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