ACC: Sample Query to Print One Label for Two People in a ListID: Q169153
|
Moderate: Requires basic macro, coding, and interoperability skills.
When you have a list of names for which you would like to generate mailing
labels, there are frequently two people listed at the same address. This
article demonstrates a technique to create a query from which to print a
single mailing label for two people at the same address.
NOTE: If more than two people on your mailing list live at the same
address, only the names from the first and last record with that address in
your table will appear in the query.
When you have an address list with two people at the same address, it is
often preferable to print a single mailing label for that address that
lists both people's names. To accomplish this, you first need to create a
query that contains the first name to print on the label, and then create a
query that contains the second name for the label. Then you can put these
two queries together to show both names for each address in a third query.
For this method to work it is important that ALL of the address information
for each person at the same address is identical. For example,
123 First Street N
123 First St. North
Record #1 Record #2 Record #3
-----------------------------------------------------------------------
Last Name: Fuller Wilkinson Smith
First Name: Mary Avery John
Birth Date: 7/2/54 4/30/77 10/20/58
Address: 908 W. Capital Way 14 Garrett Hill 4110 Old Redmond
Rd.
City: Tacoma London Minneapolis
Region: WA MN
Postal Code: 98401 SW1 8JR 55435
Country: USA UK USA
Query: qryLabelNames1
------------------------------------------------------
Type: Totals Query
Field: ListName: First([FirstName] & " " & [LastName])
Table: Employees
Total: Expression
Sort: Ascending
Field: Address
Table: Employees
Total: Group By
Sort: None
Field: City
Table: Employees
Total: Group By
Sort: None
Field: Region
Table: Employees
Total: Group By
Sort: None
Field: PostalCode
Table: Employees
Total: Group By
Sort: None
Field: Country
Table: Employees
Total: Group By
Sort: None
Field: ListName: Last([FirstName] & " " & [LastName])
Table: Employees
Total: Expression
Sort: Ascending
Query: qryMailingList
---------------------------------------------------------
Type: Select Query
Join: qryLabelNames1.Address <-> qryLabelNames2.Address
Join: qryLabelNames1.PostalCode <-> qryLabelNames2.PostalCode
Field: Name1: ListName
Table: qryLabelNames1
Sort: None
Field: Name2: IIf([qryLabelNames1].[ListName]= _
[qryLabelNames2].[ListName],"",[qryLabelNames2].[ListName])
Sort: None
Field: Address
Table: qryLabelNames1
Sort: None
Field: City
Table: qryLabelNames1
Sort: None
Field: Region
Table: qryLabelNames1
Sort: None
Field: PostalCode
Table: qryLabelNames1
Sort: None
Field: Country
Table: qryLabelNames1
Sort: None
For more information about using the Label Wizard, search the Help Index for "mailing labels," or ask the Office Assistant.
Keywords : kbprint QryTotal RptLabel RptWizlbl
Version : 2.0 7.0 97
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: April 28, 1999