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!

Duplicate Labels 1

Status
Not open for further replies.

DougHomeOffice

Programmer
Oct 31, 2001
37
0
0
US
I have a query and I am trying not to change it. The query picks up children in the database with parents. This query has a unique record for each child and I use it in making a list of parents and children. However, i would like to to use the same query to generate a set of labels for the parents of the children. The problem is when ther are two children the label reprot produces 2 labels - one for ech record. Again, I know I can count for children that way there would only be one record but I am trying to supress duplicate labels or something to that effect.

-Doug
 
I think I got it. Order by Parent Last Name and Declare a variable for the module
-------------------------
Option Compare Database
Option Explicit

Dim vName

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If vName = Me.ParentName Then
Me.Detail.Visible = False

Else
Me.Detail.Visible = True
End If
vName = Me.ParentName
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top