Have you thought about how to handle the variety of data that will exist in
your 12k records?
Consider cases such as:
- People with different surnames, but the same phone number.
- More than 2 people with the same phone number (same surnames).
- More than 2 people with the same phone number (different surnames).
- Individuals who have more than one phone number.
Then comes the question of which order the names should appear in. (That
could matter where the 2 names are father and son, for example.)
To get you started:
1. Create a query into this table.
2. Depress the Total icon on the toolbar (upper sigma icon).
Access adds a Total row to the grid.
3. Drag the Phone field into the grid.
Accept Group By under this field in the Total row.
4. Drag the ID field into the grid.
Choose Count in the Total row.
In the Criteria row, enter:
5. Drag Fname into the grid.
In the Total row, choose Min
6. Drag Fname into the grid again.
In the Total row, choose Max
7. Drag the LName field into the grid.
Accept Group By (assuming you want to de-dupe on this field.)
This query shows the 2 names beside each other. You can combine them into
one text box on your report.
In the cases where CountOfID is more than 2, you still have missing names.
You could use something like this code to contatenate them if you really
wanted to:
Return a concatenated list of sub-record values
at:
http://www.mvps.org/access/modules/mdl0004.htm
A more thorough answer would be to actually define the kinds of
relationships that exist between these people so you can treat the
individuals as clients when you need to, or the household as a client when
that is appropriate. Downloadable example:
People in households and companies - Modelling human relationships
at:
http://allenbrowne.com/AppHuman.html
HTH.