Avatar of K_Deutsch
K_Deutsch
 asked on

Combine eight simple queries into one

My objective is a single query that it takes me eight queries to get to in the attached Access database file. I probably need someone to insert the query into the example and upload. Then I can study it and apply the knowledge to future queries. Thanks.

Query8 presents the data from the four related tables exactly the way I need it for exporting to Excel-

If NameCount=1 in a HOUSENUM (unique), there is one record - NAME1, NAME2 (Null), ADDRESS1, ADDRESS2, ADDRESS3, CITY, ST, ZIP
If NameCount=2 in a HOUSENUM (unique), they are combined into one record - NAME1, NAME2, ADDRESS1, ADDRESS2, ADDRESS3, CITY, ST, ZIP
If NameCount>=3 in a HOUSENUM (unique), there is one record for each name - NAME1, NAME2 (Null), ADDRESS1, ADDRESS2, ADDRESS3, CITY, ST, ZIP
Example.accdb
Microsoft Access

Avatar of undefined
Last Comment
K_Deutsch

8/22/2022 - Mon
Gustav Brock

Why would you? Query8 seems to work very well.

/gustav
ASKER CERTIFIED SOLUTION
Gozreh

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
K_Deutsch

ASKER
Massive improvement. Thanks.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy