Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mailing label wizzard

Status
Not open for further replies.

ITA

Programmer
Nov 9, 1999
18
0
0
US
Hello everyone,<br>
I am using the mailing label wizard to print out a set of laser labels, but I have a question that I can not find the answer to. I have a paramater querry pick individual records to print a label for. When I run the labels I get one name, as I should, but I want it to populate the entire sheet of labels with the one name. <br>
I am hoping that someone can tell me what I need to do to populate the entire sheet.<br>
<br>
Thanks <br>
<br>
Robert
 
This is from Microsoft... there used to be a mdb download that had this at MS's site, but I can't seem to find it anymore. Anyway, put this in a module:<br>
<br>
Dim intLabelBlanks As Integer<br>
Dim intLabelCopies As Integer<br>
Dim intBlankCount As Integer<br>
Dim intCopyCount As Integer<br>
<br>
'==========================================================<br>
' The following function will cause an inputbox to<br>
' display when the report is run that prompts the user<br>
' for the number of used labels to skip and how many<br>
' copies of each label should be printed.<br>
'===========================================================<br>
<br>
Function LabelSetup()<br>
intLabelBlanks = Val(InputBox$(&quot;Enter Number of blank labels to skip&quot;))<br>
intLabelCopies = Val(InputBox$(&quot;Enter Number of Copies to Print&quot;))<br>
If intLabelBlanks &lt; 0 Then intLabelBlanks = 0<br>
If intLabelCopies &lt; 1 Then intLabelCopies = 1<br>
End Function<br>
<br>
'===========================================================<br>
' The following function sets the variables to a zero<br>
'===========================================================<br>
<br>
Function LabelInitialize()<br>
intBlankCount = 0<br>
intCopyCount = 0<br>
End Function<br>
<br>
'===========================================================<br>
' The following function is the main part of this code<br>
' that allows the labels to print as the user desires.<br>
'===========================================================<br>
<br>
Function LabelLayout(R As Report)<br>
If intBlankCount &lt; intLabelBlanks Then<br>
R.NextRecord = False<br>
R.PrintSection = False<br>
intBlankCount = intBlankCount + 1<br>
Else<br>
If intCopyCount &lt; (intLabelCopies - 1) Then<br>
R.NextRecord = False<br>
intCopyCount = intCopyCount + 1<br>
Else<br>
intCopyCount = 0<br>
End If<br>
End If<br>
End Function<br>
<br>
<br>
Then in the OnOpen event of the report call LabelSetup and on the OnInitialize event of the report call LabelInitialize.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top