In a query I placed all the person info fields above and the ID field (autonumber).
I placed a parameter prompt of [Enter Last Name] under the last name field, and <=[Enter Qty of Labels] prompt under the ID field.
I created a report based on this query.
It would give me however many labels indicated by the user entry into the prompt boxes for one individual person.
If I entered "Smith" in the first box and 18 in the second, it would give me 18 labels for Smith.
I also had a very long piece of code that would do the same thing (still do), and a shorter piece of code as given below:
Code: Select all
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Static lngPreviousID As Long
Static lngCurrentCount As Long
If Me.ID = lngPreviousID Then
lngCurrentCount = lngCurrentCount + 1
If lngCurrentCount < Me.NumberOfCopies Then
Me.NextRecord = False
End If
Else
lngCurrentCount = 1
lngPreviousID = Me.ID
If Me.NumberOfCopies > 1 Then
Me.NextRecord = False
End If
End If
End Sub