Report grouped on criteria selection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to create a report like this:

The data for the report is:

SELECT ProjectName, ProjectNumber, ProjectManager, ProjectAssistant,
ProjectDesigner
FROM tbl_Projects
WHERE (((tbl_Projects.[ProjectManager]) Like [Enter last name]
OR (tbl_Projects.[ProjectAssistant]) Like [Enter last name]
OR (tbl_Projects.[ProjectDesigner]) Like [Enter last name]));

Essentially, I want to display, for each employee, any project they've
worked/are working on and they're role for that project.

Employee--------------------------------------------------------
Project1 Project Assistant
Project2 Project Assistant
Project3 Project Designer
Project4 Project Manager

How in the world can i do this?

/amelia
 
Create a union query to normalize your table:
SELECT ProjectName, ProjectNumber, "Manager" as Role, ProjectManager as
Employee
FROM tbl_Projects
UNION ALL

SELECT ProjectName, ProjectNumber, "Assistant", ProjectAssistant
FROM tbl_Projects
UNION ALL

SELECT ProjectName, ProjectNumber, "Designer", ProjectDesigner
FROM tbl_Projects;

You can then quite easily create your report based on the union query.
 
I'm sorry to be dim, but are all three of these SELECT statements in the same
query or am I running three different queries?

/amelia
 
Back
Top