Randomblink
The Irreverent Reverend
- Local time
- Today, 07:47
- Joined
- Jul 23, 2001
- Messages
- 279
Ok...
I have Three tables, I am going to give an example and hope someone can help.
Table #1: [tbl_Employee]
Table #2: [tbl_LINK_EmployeeProject]
Table #3: [tbl_Project]
Ok, in Table #1, I have three fields.
#1) Employee_ID (This is an autonumber field, primary key)
#2) Employee_Name
#3) Employee_Department
Ok, in Table #2, I have two fields.
#1) Employee_ID (This is an Integer field, primary key)
#2) Project_ID (This is an Integer field, primary key)
In Table #2, I set them both as Primary keys by highlighting both fields and clicking on the key icon in Access.
Ok, in Table #3, I have many fields, but only two are important.
#1) Project_ID (This is an autonumber field, primary key)
#2) Project_Title
I have gone into the relationship area and linked the following fields.
[tbl_Project].[Project_ID] connected-to [tbl_LINK_EmployeeProject].[Project_ID]
AND
[tbl_Employee].[Employee_ID] connected-to [tbl_LINK_EmployeeProject].[Employee_ID]
Ok...
I create a form to input new Projects. What I want to do is:
I have a drop-down/combo-box: [cmb_AssignEmployee] that looks up values from [tbl_Employee]. What I want to do is select an employee with this box, upon selecting an employee it will then create a new record in [tbl_LINK_EmployeeProject] where the [tbl_LINK_EmployeeProject].[Project_ID] field will equal the [tbl_Project].[Project_ID] AND where the [tbl_LINK_EmployeeProject].[Employee_ID] field is equal to the selection I just made from the combo box.
Does this make sense?
Basically, I want to link several Employees to each Project. Several Employees can be on ONE Project AND several Projects can be handled by ONE Employee.
Other than manually inputting directly into the table I don't know what to do. And the BIGGEST problem is, this Project is linked the same way to many other tables in the exact same way.
I am fairly accomplished / self-taught in VB. I can create reports, forms, and modules fairly well. But I have never dealt with Recordsets which is what I believe I need to understand to make this work. So, point me in the right direction...please!
I have Three tables, I am going to give an example and hope someone can help.
Table #1: [tbl_Employee]
Table #2: [tbl_LINK_EmployeeProject]
Table #3: [tbl_Project]
Ok, in Table #1, I have three fields.
#1) Employee_ID (This is an autonumber field, primary key)
#2) Employee_Name
#3) Employee_Department
Ok, in Table #2, I have two fields.
#1) Employee_ID (This is an Integer field, primary key)
#2) Project_ID (This is an Integer field, primary key)
In Table #2, I set them both as Primary keys by highlighting both fields and clicking on the key icon in Access.
Ok, in Table #3, I have many fields, but only two are important.
#1) Project_ID (This is an autonumber field, primary key)
#2) Project_Title
I have gone into the relationship area and linked the following fields.
[tbl_Project].[Project_ID] connected-to [tbl_LINK_EmployeeProject].[Project_ID]
AND
[tbl_Employee].[Employee_ID] connected-to [tbl_LINK_EmployeeProject].[Employee_ID]
Ok...
I create a form to input new Projects. What I want to do is:
I have a drop-down/combo-box: [cmb_AssignEmployee] that looks up values from [tbl_Employee]. What I want to do is select an employee with this box, upon selecting an employee it will then create a new record in [tbl_LINK_EmployeeProject] where the [tbl_LINK_EmployeeProject].[Project_ID] field will equal the [tbl_Project].[Project_ID] AND where the [tbl_LINK_EmployeeProject].[Employee_ID] field is equal to the selection I just made from the combo box.
Does this make sense?
Basically, I want to link several Employees to each Project. Several Employees can be on ONE Project AND several Projects can be handled by ONE Employee.
Other than manually inputting directly into the table I don't know what to do. And the BIGGEST problem is, this Project is linked the same way to many other tables in the exact same way.
I am fairly accomplished / self-taught in VB. I can create reports, forms, and modules fairly well. But I have never dealt with Recordsets which is what I believe I need to understand to make this work. So, point me in the right direction...please!