View Full Version : Relationship design - is it correct?


Teebird
09-05-2006, 03:04 PM
Hi All

This post also relates to a query but I figure that it all goes back to how my relationships are set up - they are the root of all my problems.

I have set up these relationships in my database - see attached jpg image.

When I make a query adding all the members from the Members table and only the fields BikeNo and BikeDescription from the BikeDetails (1 to many) I only get 6 records in my query - there are 28 in the Member's table. I have no other criteria in the query.

Here is the SQL for the query.

Also you will notice an extra Members 1 table in the relationship - why it is doing this - I have no Members 1 table - Access is creating.

Many thanks for any help / suggestions.
Tee

Pat Hartman
09-05-2006, 06:44 PM
The default join type is INNER. An Inner join will return a row for each row from tblA that has a related row in tblB. Sounds like not all your tblA rows will have related data in tblB. In this case, you would want to use a LEFT join. That will return all rows in tblA plus any matching data from tblB.

Teebird
09-06-2006, 02:58 PM
Excellent Many thanks for that - is working now - I did some more reading so I understand the join thing more.
Cheers Tee