2nd post on Queries and multi tables

L

Lin

I keep messing up these darn question fields. Sorry for last mess up.
Thanks to all in advance, and thanks for all the wonderful advice.
For simplicity sake:
FSMain = table with PK
Surname = linked by same key
First Name = "" as above ""
Address = "" as above ""
The last three are embedded on main form (FSMain). When I create a query, if
for ex. address has no info (nothing will show in query).
I guess I need all to show at all times even if they are blank. Can anyone
help.

Thanks again
 
A

Albert D. Kallal

When you build the query, double click on the join line, and select the
option to include all from the FSMain, and any "possible" from the child
tables.

The above is called a "left" join. That simply means that all records on the
left side will be included...and the right side ones don't have to exist.

You likely made a join where you specify that both FSMain "pk" and the child
table is "equal" for the join to occur...so, just choose the other option
when you make the join (double click on the join line).....

So, to make a left join, you drop in the tables (in the query builder, or
the
relationship designer), and draw the join line to the appropriate field
between each table. You then double click on the join line. You then click
on the join type button

You get three options:

Only include rows where the joined fields from both tables are equal
(this standard default inner join)

Include ALL records from "Customers" and only those records from
"Invoices" where the joined fields are equal

(this is our left join. So, our main table Customers will be returned in
this query, REGARDLESS if the child records (invoices in this example)
exist, or not!. This is left join

Include ALL records from "Invoices" and only those records from
"Customers" where the joined fields are equal
This sis obviously a right join....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top