Query Not Displaying All Main Table Records

  • Thread starter Thread starter Wayne
  • Start date Start date
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?
 
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;
 
Back
Top