Dear All,
This is a query about Joins.
Linking 3 tables one-to-many relationship query
Can't get my head around this problem....It's pretty fundamental to the functioning of my database so I'd really appreciate some help. I'm trying to build a query that has a main table with data drawn from 3 related tables. The purpose is to allow independed expansion of the tables (adding of Roles, Departments and related Data about Members in 3 tables tblRole, tblDepartments and tblMemberStatus respectively). I imagine the answer is really simple....
The end of the SQL looks like this:
[FONT="]FROM ((tblMainTable INNER JOIN tblDepartment ON tblMainTable.intIDDepartment = tblDepartment.intIDDepartment) INNER JOIN tblMemberStatus ON tblMainTable.intMemberStatusID = tblMemberStatus.intMemberStatusID) INNER JOIN tblRole ON tblMainTable.intIDRole = tblRole.intIDRole;
I've attached a zipped version of the query that I'm trying to build. With one Join the query Runs. With 2 or More the query returns no results. I've tried many different methods but cannot get this to work. I've previously used "lookup" fields that query from other tables to draw data to the main table to get it to work but this doesn't seem like an ideal solution.
Can someone please walk me through this?
Thanks In advance for your Help!
Seb[/FONT]
This is a query about Joins.
Linking 3 tables one-to-many relationship query
Can't get my head around this problem....It's pretty fundamental to the functioning of my database so I'd really appreciate some help. I'm trying to build a query that has a main table with data drawn from 3 related tables. The purpose is to allow independed expansion of the tables (adding of Roles, Departments and related Data about Members in 3 tables tblRole, tblDepartments and tblMemberStatus respectively). I imagine the answer is really simple....
The end of the SQL looks like this:
[FONT="]FROM ((tblMainTable INNER JOIN tblDepartment ON tblMainTable.intIDDepartment = tblDepartment.intIDDepartment) INNER JOIN tblMemberStatus ON tblMainTable.intMemberStatusID = tblMemberStatus.intMemberStatusID) INNER JOIN tblRole ON tblMainTable.intIDRole = tblRole.intIDRole;
I've attached a zipped version of the query that I'm trying to build. With one Join the query Runs. With 2 or More the query returns no results. I've tried many different methods but cannot get this to work. I've previously used "lookup" fields that query from other tables to draw data to the main table to get it to work but this doesn't seem like an ideal solution.
Can someone please walk me through this?
Thanks In advance for your Help!
Seb[/FONT]