Urgen Query Help Needed

T

tmdrake

I have a main form that the user can select a ProjectID. When this is
selected a subform displays all the records in that table for that ProjectID.
My problem is that for example: I select ProjectID (PWD) the subform will
disiplay every employee working on that project, but instead on displaying
the employee only once, the query produces a record for each week the
employee was assigned to that project. I would like for the employee's
information to only show once and not for every week worked. Is there a way
to write the query?

All help is appreciated.
 
E

Evi

This sounds like it may be a Database design problem.

You will, (hopefully) have a Project Table (PrimaryKey ProjID) and an
Employee Table (PK EmpID)
You need a ProjectEmployee table (PK ProjEmpID) which has ProjID and EmpID
as foreign key fields and lists all the Employees assigned to a project

You also seem to have a table which perhaps lists the stages in the
Project - this is the table with the date field on which your subform is
based.

I'm not sure how you've structured this.

Are several employees assigned to each stage in a project?

If yes, then you need a StageEmployee table as well as a ProjectStages
table. This can be displayed as second subform linked to both your main Form
and the first subform so that when you click on a stage in the first
subform, those employees linked to that stage will appear in the second
subform.

Evi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top