G
Glenn Brown
I have a database with 3 main tables - projects, companies and contacts. A
contact is always linked back to the companies table. A one-to-many
relationship.
WHAT I WANT: -
1. A projects form with a companies subform, which allows users to select
various companis that are working on the project. This is a many-to-many
relationship.
2. Once the user has selected the companies which are working on the
project. I want a subform within each company (I think this is the best way?)
which enables the user to select contacts from each company which have been
selected in stage 1.
QUESTION:-
1. What should the table structure and relationship be for stage 2? I'm
thinking it should be many-to-many as well?
2. Here's my guess at a table structure - where have I gone wrong?
PROJECTS
projectID
project name....
COMPANIES
companyID
company name....
CONTACTS
contactID
contact name
companyID...
PROJECTS_COMPANIES (many-to-many relationship)
projectID
companyID
COMPANIES_CONTACTS (this is where I need help?)
projectID & companyID
contactID
Regards,
Glenn
Regards,
Glenn
contact is always linked back to the companies table. A one-to-many
relationship.
WHAT I WANT: -
1. A projects form with a companies subform, which allows users to select
various companis that are working on the project. This is a many-to-many
relationship.
2. Once the user has selected the companies which are working on the
project. I want a subform within each company (I think this is the best way?)
which enables the user to select contacts from each company which have been
selected in stage 1.
QUESTION:-
1. What should the table structure and relationship be for stage 2? I'm
thinking it should be many-to-many as well?
2. Here's my guess at a table structure - where have I gone wrong?
PROJECTS
projectID
project name....
COMPANIES
companyID
company name....
CONTACTS
contactID
contact name
companyID...
PROJECTS_COMPANIES (many-to-many relationship)
projectID
companyID
COMPANIES_CONTACTS (this is where I need help?)
projectID & companyID
contactID
Regards,
Glenn
Regards,
Glenn