Report grouped on criteria selection

A

aaearhart

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
 
D

Duane Hookom

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.
 
A

aaearhart

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
 

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

Top