Query Not Displaying All Main Table Records

W

Wayne

I have a simple database setup with the following:

tblTest (4 records)
TestID - Auto-Number Key field
Name-4 different names

tblTestSub (3 records)
TestID - (linked to tblTest, 1 to M)
Auto - 3 different cars listed
In the table relationship I have selected the following:
Include ALL records from 'tblTest' and only those records
from 'tblTestSub' where the joined fields are equal.

Only one name is linked to 3 different cars.

Query:
SELECT tblTest.Name, tblTestSub.Auto
FROM tblTest INNER JOIN tblTestSub ON tblTest.TestID =
tblTestSub.TestID;

Per the relationship I want to show ALL records from 'tblTest' and
only those records from 'tblTestSub' where the joined fields are
equal.
The query shows only one name that has links to tblTestSub so I never
see
the other three names.

What do I need to do to see all Names and only the auto's that are
matched?
 
W

Wayne

I have a simple database setup with the following:

tblTest (4 records)
        TestID - Auto-Number Key field
        Name-4 different names

tblTestSub (3 records)
        TestID - (linked to tblTest, 1 to M)
        Auto - 3 different cars listed
In the table relationship I have selected the following:
Include ALL records from 'tblTest' and only those records
 from 'tblTestSub' where the joined fields are equal.

Only one name is linked to 3 different cars.

Query:
SELECT tblTest.Name, tblTestSub.Auto
FROM tblTest INNER JOIN tblTestSub ON tblTest.TestID =
tblTestSub.TestID;

Per the relationship I want to show ALL records from 'tblTest' and
 only those records from 'tblTestSub' where the joined fields are
equal.
The query shows only one name that has links to tblTestSub so I never
see
the other three names.

What do I need to do to see all Names and only the auto's that are
matched?

Never mine. I got it.

SELECT tblTest.Name, tblTestSub.Auto
FROM tblTest left JOIN tblTestSub ON tblTest.TestID =
tblTestSub.TestID;
 

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