I have the following query that tells me how many times each option of a particular field (Age_Causes.Cause) appears in a table (AgeReview) based on certain criteria (ReviewDate, Operation, Department and TeamIDRS):
SELECT Age_Causes.Cause, Count(AgeReview.AgeCause) AS CountOfAgeCause2
FROM Age_Causes INNER JOIN (Team_Info INNER JOIN AgeReview ON Team_Info.TeamIDRS = AgeReview.TeamIDRS) ON Age_Causes.ID = AgeReview.AgeCause
WHERE (((AgeReview.ReviewDate)=[ReviewDate1]) AND ((Team_Inf
peration) Like [Operation1]) AND ((Team_Info.Department) Like [Department1]) AND ((AgeReview.TeamIDRS) Like [TeamIDRS1]))
GROUP BY Age_Causes.Cause;
I then have this query that tells me how many total records there are based on the same criteria as the 1st query:
SELECT Age_Causes.Cause, Count(AgeReview.AgeCause) AS CountOfAgeCause2
FROM Age_Causes INNER JOIN (Team_Info INNER JOIN AgeReview ON Team_Info.TeamIDRS = AgeReview.TeamIDRS) ON Age_Causes.ID = AgeReview.AgeCause
WHERE (((AgeReview.ReviewDate)=[ReviewDate1]) AND ((Team_Inf
peration) Like [Operation1]) AND ((Team_Info.Department) Like [Department1]) AND ((AgeReview.TeamIDRS) Like [TeamIDRS1]))
GROUP BY Age_Causes.Cause;
Finally, I have this third query that divides the results in the first query by the results of the second to give the percentage for each value in the aforementioned table:
SELECT Age_Cause_Summary_by_date_Team.Cause, Age_Cause_Summary_by_date_Team.CountOfAgeCause2, Format([Age_Cause_Summary_by_date_Team]![CountOfAgeCause2]/[Cause_Summary_team]![CountOfCause],"Percent") AS [Percent]
FROM Age_Cause_Summary_by_date_Team, Cause_Summary_team
ORDER BY Format([Age_Cause_Summary_by_date_Team]![CountOfAgeCause2]/[Cause_Summary_team]![CountOfCause],"Percent") DESC;
If at all possible, I need one query that will do all of the above. I am trying to accomplish the same result as the third query on a webpage using FrontPage, but using a query that is based on 2 other queries is causing me to lose my parameters from the 1st two queries.
SELECT Age_Causes.Cause, Count(AgeReview.AgeCause) AS CountOfAgeCause2
FROM Age_Causes INNER JOIN (Team_Info INNER JOIN AgeReview ON Team_Info.TeamIDRS = AgeReview.TeamIDRS) ON Age_Causes.ID = AgeReview.AgeCause
WHERE (((AgeReview.ReviewDate)=[ReviewDate1]) AND ((Team_Inf
GROUP BY Age_Causes.Cause;
I then have this query that tells me how many total records there are based on the same criteria as the 1st query:
SELECT Age_Causes.Cause, Count(AgeReview.AgeCause) AS CountOfAgeCause2
FROM Age_Causes INNER JOIN (Team_Info INNER JOIN AgeReview ON Team_Info.TeamIDRS = AgeReview.TeamIDRS) ON Age_Causes.ID = AgeReview.AgeCause
WHERE (((AgeReview.ReviewDate)=[ReviewDate1]) AND ((Team_Inf
GROUP BY Age_Causes.Cause;
Finally, I have this third query that divides the results in the first query by the results of the second to give the percentage for each value in the aforementioned table:
SELECT Age_Cause_Summary_by_date_Team.Cause, Age_Cause_Summary_by_date_Team.CountOfAgeCause2, Format([Age_Cause_Summary_by_date_Team]![CountOfAgeCause2]/[Cause_Summary_team]![CountOfCause],"Percent") AS [Percent]
FROM Age_Cause_Summary_by_date_Team, Cause_Summary_team
ORDER BY Format([Age_Cause_Summary_by_date_Team]![CountOfAgeCause2]/[Cause_Summary_team]![CountOfCause],"Percent") DESC;
If at all possible, I need one query that will do all of the above. I am trying to accomplish the same result as the third query on a webpage using FrontPage, but using a query that is based on 2 other queries is causing me to lose my parameters from the 1st two queries.