Gilbertjoe
MIS
Hi.
I have the following tables.
Employee
employeeid-autonumber primary key
Name- text
Projects
Projectid-autonumber primary key
projectname- text
projectdescription-text
Boxes
boxid-autonumber primary key
boxname-test
boxdescription-text
projectid-lookup to project
Worklog
Workid-autonumber primary key
Date- medium date
Start- short time
stop- short time
project- lookup to projects table-projectid
box-lookup to box table-boxid
name-lookup to name table-employeeid
Relationships are as follows:
Employees to Projects- Many to many
Employees to boxes- Many to many
Employees to worklog-one to many
projects to boxes- one to many
Projects to worklog-many to many
boxes to worklog-many to many
(hope i got that straight...)
So I have a form called project with a subform called boxes, one project relates to many boxes.
This works fine.
I have another form called work done with subform called work detail inside it.
The work done form contains the employeeid and name fields from the employee table
The work detail subform contains all the fields from the worklog table.
This all works fine with one problem.
The projects field is a combo box and the box field is a combo box
I want to have the box field only have the boxes that are related to the project combo box
(Example)
If I select a project from my project combo box on the work detail subform, I only want boxes that were assigned to that project to appear in the combo box
I have the following tables.
Employee
employeeid-autonumber primary key
Name- text
Projects
Projectid-autonumber primary key
projectname- text
projectdescription-text
Boxes
boxid-autonumber primary key
boxname-test
boxdescription-text
projectid-lookup to project
Worklog
Workid-autonumber primary key
Date- medium date
Start- short time
stop- short time
project- lookup to projects table-projectid
box-lookup to box table-boxid
name-lookup to name table-employeeid
Relationships are as follows:
Employees to Projects- Many to many
Employees to boxes- Many to many
Employees to worklog-one to many
projects to boxes- one to many
Projects to worklog-many to many
boxes to worklog-many to many
(hope i got that straight...)
So I have a form called project with a subform called boxes, one project relates to many boxes.
This works fine.
I have another form called work done with subform called work detail inside it.
The work done form contains the employeeid and name fields from the employee table
The work detail subform contains all the fields from the worklog table.
This all works fine with one problem.
The projects field is a combo box and the box field is a combo box
I want to have the box field only have the boxes that are related to the project combo box
(Example)
If I select a project from my project combo box on the work detail subform, I only want boxes that were assigned to that project to appear in the combo box