I have three tables in a many to many relationship.
tbl_Projects which contains the Project_ID (PK - autonumber) field and Project_Name (text) field.
tbl_Contractors which contains the Contractor_ID (PK - autonumber) field and Contractor_Firm (text) field
tbl_Eligible_Bidders which contains both Project_ID (FK - number) and Contractor_ID (FK - number) fields as conposite index. This table acts as an associate table for my many to many relationship.
Each Project can have any number of eligible bidders (contractors) and each contractor can bid on any number of projects.
I then created a query (qry_Eligible_Bidders) based on these tables as the following:
Now I am trying to create a form that will allow me to add contractors to projects. I started by creating a form based on the tbl_Projects table. Next I added a subform using qry_Eligible_Bidders linked by the Project_ID fields found in both.
Next I assign a Contractor to a Project - using a combobox with the following as it's row source:
I have the bound column set to 1, Column count set to 2, and Column Widths at 0",1".
When I do this, the associated table updates correctly, but I also seem to be adding a record to my tbl_Contractors. Any help would be greatly appreciated.
tbl_Projects which contains the Project_ID (PK - autonumber) field and Project_Name (text) field.
tbl_Contractors which contains the Contractor_ID (PK - autonumber) field and Contractor_Firm (text) field
tbl_Eligible_Bidders which contains both Project_ID (FK - number) and Contractor_ID (FK - number) fields as conposite index. This table acts as an associate table for my many to many relationship.
Each Project can have any number of eligible bidders (contractors) and each contractor can bid on any number of projects.
I then created a query (qry_Eligible_Bidders) based on these tables as the following:
Code:
SELECT tbl_Eligible_Bidders.Project_ID, tbl_Eligible_Bidders.Contractor_ID, tbl_Projects.Project_Name, tbl_Contractors.Contractor_Firm
FROM tbl_Projects INNER JOIN (tbl_Contractors INNER JOIN tbl_Eligible_Bidders ON tbl_Contractors.Contractor_ID = tbl_Eligible_Bidders.Contractor_ID) ON tbl_Projects.Project_ID = tbl_Eligible_Bidders.Project_ID;
Now I am trying to create a form that will allow me to add contractors to projects. I started by creating a form based on the tbl_Projects table. Next I added a subform using qry_Eligible_Bidders linked by the Project_ID fields found in both.
Next I assign a Contractor to a Project - using a combobox with the following as it's row source:
Code:
SELECT tbl_Contractors.Contractor_ID, tbl_Contractors.Contractor_Firm
FROM tbl_Contractors
ORDER BY tbl_Contractors.Contractor_Firm;
I have the bound column set to 1, Column count set to 2, and Column Widths at 0",1".
When I do this, the associated table updates correctly, but I also seem to be adding a record to my tbl_Contractors. Any help would be greatly appreciated.