Queries with 3 tables

V

Vadimbar

Hello, I have 3 tables (Cuase&Effect_tbl, Catalogue_tbl and a comments_tbl)
Comments table and catalogue table can grow as additional items are added.
The Cause&Effect_tbl shows the combined data and allows you to add more of
either one by assigning its ID value to Comments_tbl and/or Catalohue_tbl.
The problem is now I want to create a report that captures all the comments
and all the catalogues without repeating the same inf.
Example in Cause&Effect_tble ID=59 I added to this record 3 comments so
their commentsID=59 and they have their own unique ID's as well.
Cause&Effect_tbl record 59 also received 5 catalogues same situating
CatalogueID=59 ad it has its own unique ID for each item added.
My report needs to show only the 3 comments and the 5 catalogues yet I get
15 records total. If I try to incorporate the Cause&Effect_tbl I get 75
records.
HELP!
Vadimbar
 
R

Rick B

Fix your joins.

Right click on the arrows connecting the tables and adjust the join type.

You should get three options. Select the appropriate one to include all
records from the main table and only related records.
 
V

Vadimbar

Need more info please.
Comments_tbl=> ID, Comment ID, Comments
Catalogue_tbl=> ID, Catalogue ID, Catalogue
Cause&Effect_tbl=> ID, ..............

As I enter data into the Cause&Effec_tbl its ID example 59 will be assigned
to Comment ID=59 and If I want to add a Catalogue to this record it will have
a Catalogue ID=59.

Now example:
Comments_tbl=> ID=6, Comment ID=59, Comments="Hello"
Comments_tbl=> ID=7, Comment ID=59, Comments="YES"
Comments_tbl=> ID=8, Comment ID=59, Comments="No"

Catalogue_tbl=> ID=12, Catalogue ID=59, Catalogue="343-10-009"
Catalogue_tbl=> ID=13, Catalogue ID=59, Catalogue="10"
Catalogue_tbl=> ID=14, Catalogue ID=59, Catalogue="9"
Catalogue_tbl=> ID=15, Catalogue ID=59, Catalogue="12"

My relationship set:
Cause&Effect_tbl ID=Comment ID
Cause&Effect_tbl ID=Catalogue ID



When I run the query
4*3=12 records of
Catalogue Comment
10 Hello
10 No
10 Yes
12 Hello
12 No
12 Yes
343-10-009 Hello
343-10-009 No
343-10-009 Yes
9 Hello
9 No
9 Yes

What I need is
List of all the comments with unique/Same Comment ID and then all the
Catalogues
Hello
Yes
No
343-10-009
10
9
12

When I try to run a report I was able to get the list of commenst. When I
introduced the possibility of more then one Catalogues thats when I got stuck.

Please help.
Thank you,
Vadimbar...
 
Top