chosing alternate fields in query

  • Thread starter Thread starter CrossofG
  • Start date Start date
C

CrossofG

I have a list of families grouped by their last name as
family units. Sometimes the children will have an
different last name. How do I tell a query that if the
child has a different last name to use that instead of the
families last name. I need to be able to print out
accurate mailing labels for each child and for the
families. Currently I have two fields, "family name"
and "different last name".
thanks!
 
you could add a calculated field to the query, as

RightName: Nz(DifferentLastName, FamilyName)

hth
 
I have a list of families grouped by their last name as
family units. Sometimes the children will have an
different last name. How do I tell a query that if the
child has a different last name to use that instead of the
families last name. I need to be able to print out
accurate mailing labels for each child and for the
families. Currently I have two fields, "family name"
and "different last name".
thanks!

I'd suggest having two tables in a one to many relationship: Families,
with the address, a generic name ("The Jones Family"), and a unique
FamilyID, linked one to many to a People table with FirstName and
LastName (and any other needed) fields. This would let one family have
as many different lastnames as there are people in it (Fred Jones,
Mary Smith, and Timmy Smith-Jones frex).
 
Back
Top