D
David
Hello ol wise ones,
I'm using Access 2002. Two questions to help improve this crosstab query.
Question1: I have combined the fields due_date and task so the column order
would be correct. Is there a way to keep the sort order by due_date but only
display the field task? I've tried using RIGHT, but as it trims, it also
impact the sort criteria.
Question2: the tasks may be unique for each value in SR field. Can I place
a N/A in the rows which that particular task does not apply? Current it
shows blank cell. I like the blank cell if it is a task for the SR, but no
value in the field Date_Completed.
Example:Rec1 has Task1 in the table. Rec2 does not have Task1 in the table
Table
Record 1
Field SR - Rec1
Field Task - Task1
Date_Completed - (blank)
Record 2
Field SR - Rec1
Field Task - Task2
Date_Completed - 11/15/06
Record 3
Field SR - Rec2
Field Task - Task2
Date_Completed - 11/15/06
(how I would like it to appear)
SR----Task1------Task2
Rec1--(blank)-- 11/15/06
Rec2--N/A------11/15/06
With the query below, Rec1 and Rec2, for Task1 will both be (blank).
TRANSFORM First(tbl_Milestone_History_for_SR.Date_Completed) AS
FirstOfDate_Completed
SELECT tbl_Milestone_History_for_SR.Release,
tbl_Milestone_History_for_SR.SR, tbl_Projects.Project_Name,
tbl_Projects.Analyst
FROM tbl_Milestone_History_for_SR INNER JOIN tbl_Projects ON
tbl_Milestone_History_for_SR.SR = tbl_Projects.SR
GROUP BY tbl_Milestone_History_for_SR.Release,
tbl_Milestone_History_for_SR.SR, tbl_Projects.Project_Name,
tbl_Projects.Analyst
ORDER BY [Due_Date] & " " & [Task]
PIVOT [Due_Date] & " " & [Task];
Any suggestions you have, is greatly appreciated.
Thank you,
David
I'm using Access 2002. Two questions to help improve this crosstab query.
Question1: I have combined the fields due_date and task so the column order
would be correct. Is there a way to keep the sort order by due_date but only
display the field task? I've tried using RIGHT, but as it trims, it also
impact the sort criteria.
Question2: the tasks may be unique for each value in SR field. Can I place
a N/A in the rows which that particular task does not apply? Current it
shows blank cell. I like the blank cell if it is a task for the SR, but no
value in the field Date_Completed.
Example:Rec1 has Task1 in the table. Rec2 does not have Task1 in the table
Table
Record 1
Field SR - Rec1
Field Task - Task1
Date_Completed - (blank)
Record 2
Field SR - Rec1
Field Task - Task2
Date_Completed - 11/15/06
Record 3
Field SR - Rec2
Field Task - Task2
Date_Completed - 11/15/06
(how I would like it to appear)
SR----Task1------Task2
Rec1--(blank)-- 11/15/06
Rec2--N/A------11/15/06
With the query below, Rec1 and Rec2, for Task1 will both be (blank).
TRANSFORM First(tbl_Milestone_History_for_SR.Date_Completed) AS
FirstOfDate_Completed
SELECT tbl_Milestone_History_for_SR.Release,
tbl_Milestone_History_for_SR.SR, tbl_Projects.Project_Name,
tbl_Projects.Analyst
FROM tbl_Milestone_History_for_SR INNER JOIN tbl_Projects ON
tbl_Milestone_History_for_SR.SR = tbl_Projects.SR
GROUP BY tbl_Milestone_History_for_SR.Release,
tbl_Milestone_History_for_SR.SR, tbl_Projects.Project_Name,
tbl_Projects.Analyst
ORDER BY [Due_Date] & " " & [Task]
PIVOT [Due_Date] & " " & [Task];
Any suggestions you have, is greatly appreciated.
Thank you,
David