I am trying to create a query that will sort a table by program number, then project number, and then by discipline. I have accomplished the the sorting by program and project number, but that is where the problem occurs. In this table, EngWo, each record tracks project and program, the engineer's name, and how many hours they worked. Their job discipline is saved in a different table, Ref_Employee. What I am having trouble with is getting the query to display for each project/program the number of hours each DISCIPLINE has worked. I have tried this several different ways and came up with different results. One result was sorting by each program and project, then listing each engineer's discipline and their hours, so there were multiple listings of the same job discipline for a particular project. Another result was to have it list only one discipline for each project (at least this one summed all of that discipline's hours correctly).
I know this is kinda hard to understand, so I tried to put an example below:
~~WHAT I WANT!!!!~~
Program E100
Project 47
Electrical - 7 hrs
Manufacturing - 8 hrs
Project 53
Product - 3 hrs
Manufacturing - 5 hrs
Tooling - 7 hrs
Program E101.....
~~WHAT I GOT!!~~
Program E100
Project 47
Electrical - 3 hrs
Electrical - 4 hrs
Manufacturing - 2 hrs
Manufacturing - 4 hrs
Manufacturing - 2 hrs
Project 53
Product - 2 hrs
Product - 1 hrs
Manufacturing - 3 hrs
Manufacturing - 2 hrs
Tooling - 3 hrs
Tooling - 2 hrs
Tooling - 2 hrs
Program E101.....
~~OR...~~
Program E100
Project 47
Electrical - 7 hrs
Project 53
Product - 3 hrs
Program E101.....
Any help is much appreciated!! Thanks in advance!
Jon
I know this is kinda hard to understand, so I tried to put an example below:
~~WHAT I WANT!!!!~~
Program E100
Project 47
Electrical - 7 hrs
Manufacturing - 8 hrs
Project 53
Product - 3 hrs
Manufacturing - 5 hrs
Tooling - 7 hrs
Program E101.....
~~WHAT I GOT!!~~
Program E100
Project 47
Electrical - 3 hrs
Electrical - 4 hrs
Manufacturing - 2 hrs
Manufacturing - 4 hrs
Manufacturing - 2 hrs
Project 53
Product - 2 hrs
Product - 1 hrs
Manufacturing - 3 hrs
Manufacturing - 2 hrs
Tooling - 3 hrs
Tooling - 2 hrs
Tooling - 2 hrs
Program E101.....
~~OR...~~
Program E100
Project 47
Electrical - 7 hrs
Project 53
Product - 3 hrs
Program E101.....
Any help is much appreciated!! Thanks in advance!
Jon