Need to create queries that lists fields from 2 tables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an access database. It contains two tables with a one to many join.

The primary table has the following fields:

Name
Address
Phone
Primary Email Address

In the second linked table, you can enter additional email addresses for any
person named in

the primary table.

Now, I want to make a query out of these, that I can then create into a
report.

I want my query to show all the names, addresses, phone, primary email, and
additional email

addresses of anyone who happens to have additional emails. However, I also
want it to show

the name, address, phone, and primary email even if there are NO secondary
email addresses.

I can seem to do one or the other in seperate queries, but I can't seem to
figure out how to

do it all in one query. I figure it might require some type of if/then
statement, but I'm

not sure how to manufacture it. Can anyone help?
 
If you are using the query grid,

Put both tables into the query
Select the fields you want to display
Link the primary table to the Second table
Double click on the join line
Select the option that gives you ALL records in the primary table and only those
.... for the second table.

That should give you multiple records when someone has additional email
addresses and one record when they have one or no additional email addresses.
 
Back
Top