If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Report grouped on criteria selection
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 |
#2
|
|||
|
|||
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. -- Duane Hookom MS Access MVP "aaearhart" wrote in message ... 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 |
#3
|
|||
|
|||
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 |
#4
|
|||
|
|||
Nevermind that last question. Give me anouther minute on it...
/aae |
#5
|
|||
|
|||
you're the man, Duane
thanks again. /amelia |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Report Selection Criteria | ttaylor | Setting Up & Running Reports | 5 | June 25th, 2005 03:25 AM |
report selection criteria | Jean | Using Forms | 2 | May 19th, 2005 07:26 PM |
Report Criteria: Query works, but report doesn't call up query??? | BARKAROO | New Users | 5 | October 18th, 2004 06:35 PM |
Form to Enter Report Criteria works, but Query won't run from Macr | BARKAROO | Using Forms | 1 | October 16th, 2004 08:13 PM |
Referencing controls in a Selection Criteria form for Reports | Barry G. Sumpter | Using Forms | 2 | June 15th, 2004 06:15 AM |