Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

populate a combo box from anothre combo box in a subform

Status
Not open for further replies.
Apr 19, 2000
73
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top