Using Access 2007
I have constructed fifteen queries that are modeled like this:
The second query would differ in that CType would = 2 instead of 1, and it continues on for 3, 4, and 5.
thus producing 5 queries titled
PS_One_Percent, PS_Two_Percent, PS_Three_Percent, PS_Four_Percent, and
PS_Five_Percent
(for simplification the actual query names were changed)
I am trying to find a way of storing each one of these individual query results in ONE table.
If that can be done then I can generate a report with all 5 calculated percents on one report (without using sub reports).
If anyone could help me get that done I would be very grateful.
If someone has another solution to this that would also be wonderful.
Thanks in advance.
EDIT
I tried using a UNION on each of the 5 queries above, but this produces another problem.
I have no way of labeling each individual percentage when I make the report from that UNION query.
The desired report should look something like this...
Percentage_ONE : <label for perecentage one>
Percentage_TWO : <label for perecentage two>
etc.
I have constructed fifteen queries that are modeled like this:
Code:
Query Name::PS_One
SELECT CName, COUNT(CName) AS PC
FROM Contact
WHERE CType=1 And EDate Between Start_Date And End_Date
GROUP BY Contact.[CName];
Query Name::PS_One_Total
SELECT Count(PS_One.[CName]) AS ["PS"]
FROM PS_One;
Query Name::PS_One_Percent
SELECT Round(([PS_One_Total]!["PS"])/([CCount]!["CCount"])*100,2) AS test
FROM CCount, PS_One_Total;
thus producing 5 queries titled
PS_One_Percent, PS_Two_Percent, PS_Three_Percent, PS_Four_Percent, and
PS_Five_Percent
(for simplification the actual query names were changed)
I am trying to find a way of storing each one of these individual query results in ONE table.
If that can be done then I can generate a report with all 5 calculated percents on one report (without using sub reports).
If anyone could help me get that done I would be very grateful.
If someone has another solution to this that would also be wonderful.
Thanks in advance.
EDIT
I tried using a UNION on each of the 5 queries above, but this produces another problem.
I have no way of labeling each individual percentage when I make the report from that UNION query.
The desired report should look something like this...
Percentage_ONE : <label for perecentage one>
Percentage_TWO : <label for perecentage two>
etc.
Last edited: