A
Amit
Hi,
I have the following tables in my database (PK-Primary
Key, FK-Foreign Key):
1. Project Table (ProjectID [PK], ProgramID (FK),...)
2. Objective Table (ObjectiveID [PK], ObjectiveDescr,
ProgramID (FK))
3. Project_Objective Table (ProjectID [PK], ObjectiveID
[PK])
4. Program Table (ProgramID [PK], Program Name)
Relationships:
-One Program can have many Projects.
-One Program can have many Objectives.
-One Project can have many Objectives associated with it
(from the comprehensive list only of its' Program
Objectives)
So, each Program can have 'n' different Objectives, and
then each Project for that Program can have 'm' (m <= n)
Objectives associated with it.
Problem:
I have a subform (sfrmProjectObjectives) based on a query
(the query gets all the records from table 3., and the
corresponding ProgramID and ObjectiveDescr) to list all
the SELECTED Objectives for a Project, using a list. The
list has ProgramID, ProjectID, ObjectiveID and
ObjectiveDescr; with the first 3 columns invisible.
I have a form (frmProject) and I'm trying to show the list
of selected Objectives for the Project. I inserted the
subform in the main form, and the Parent-Child link is the
ProjectID. I also put a "Requery list" statement in the
OnCurrent event for the frmProject.
But, when I view the form, the list displays ALL the
Project Objectives from table 3., instead of the
Objectives only related to the current Project (ProjectID).
If someone can help me with this, I'll appreciate that.
I'm not sure what mistake I'm making.
Thanks!
-Amit
I have the following tables in my database (PK-Primary
Key, FK-Foreign Key):
1. Project Table (ProjectID [PK], ProgramID (FK),...)
2. Objective Table (ObjectiveID [PK], ObjectiveDescr,
ProgramID (FK))
3. Project_Objective Table (ProjectID [PK], ObjectiveID
[PK])
4. Program Table (ProgramID [PK], Program Name)
Relationships:
-One Program can have many Projects.
-One Program can have many Objectives.
-One Project can have many Objectives associated with it
(from the comprehensive list only of its' Program
Objectives)
So, each Program can have 'n' different Objectives, and
then each Project for that Program can have 'm' (m <= n)
Objectives associated with it.
Problem:
I have a subform (sfrmProjectObjectives) based on a query
(the query gets all the records from table 3., and the
corresponding ProgramID and ObjectiveDescr) to list all
the SELECTED Objectives for a Project, using a list. The
list has ProgramID, ProjectID, ObjectiveID and
ObjectiveDescr; with the first 3 columns invisible.
I have a form (frmProject) and I'm trying to show the list
of selected Objectives for the Project. I inserted the
subform in the main form, and the Parent-Child link is the
ProjectID. I also put a "Requery list" statement in the
OnCurrent event for the frmProject.
But, when I view the form, the list displays ALL the
Project Objectives from table 3., instead of the
Objectives only related to the current Project (ProjectID).
If someone can help me with this, I'll appreciate that.
I'm not sure what mistake I'm making.
Thanks!
-Amit