Form based on 2 tables not showing all records? (1 Viewer)

t.freriks

New member
Local time
Today, 06:24
Joined
May 2, 2008
Messages
3
Hi

I have a form, based on 2 tables: 1) Employees 2) Cars

i have let's say 150 employees, and 50 cars so the tables don't have an equal amount of records. (5 cars are not owned by anyone)

My main 'Employee-form' is working ok, it shows the records of ALL people, and with some of them also the car they own. In a choice-list i can select another car if somebody changes a car.




In my form ' Cars' i want to show ALL records of ALL cars, if they have owned by anyone or not, preferred without the use of a subform.

With this query (where de 'Cars-form is based on) it only shows the records of cars wich are owned by somebody, can anybody explain why and what i should to to improve that?
Query of the form:
Code:
SELECT Table_Cars.*, [Table_Employees].*
FROM Table_Cars INNER JOIN [Table_Employees] ON Table_Cars.Car_Id = [Table_Employees].Cars_Car_ID;

Thomas
 

RuralGuy

AWF VIP
Local time
Yesterday, 22:24
Joined
Jul 2, 2005
Messages
13,826
Use a Left Join instead of an Inner Join.
 

t.freriks

New member
Local time
Today, 06:24
Joined
May 2, 2008
Messages
3
Use a Left Join instead of an Inner Join.

Stanx!

I tried it and used an LEFT OUTER JOIN, is that the same as LEFT JOIN I presume?

and... it works! (not that great in sql yet, but it's comong to me...)
 

RuralGuy

AWF VIP
Local time
Yesterday, 22:24
Joined
Jul 2, 2005
Messages
13,826
Stanx!
I tried it and used an LEFT OUTER JOIN, is that the same as LEFT JOIN I presume?
and... it works! (not that great in sql yet, but it's comong to me...)
Yes, they are the same. I'm not that good at SQL yet either but you pick things up as you go. Lots of success with the rest of the project.
 

Users who are viewing this thread

Top Bottom