C
Christopher W via AccessMonster.com
I have been trying to develop a graph using Microsoft Graph 2000 Chart. I in
encountered errors when I tried running it from a query that used anything as
a criteria, i.e. a combo box or a text box etc; I posted this problem on this
site and received the instructions to insert the following in to my row
source column:
SELECT (Format([Date of Research],"MMM 'YY")) ,
Sum([New cost (Install)]) AS [Sum Of New cost (Install)]
FROM [GQ-IC]
WHERE [ANZIC] = [Forms]![Graph Selection]![combo13]
GROUP BY Year([Date of Research])*12 + Month([Date of Research])-1,
Format([Date of Research], "MMM 'YY");
Instead of:
TRANSFORM Sum([New cost (Install)]) AS [SumOfNew cost (Install)]
SELECT (Format([Date of Research],"MMM 'YY"))
FROM [GQ-GA-]
GROUP BY (Year([Date of Research])*12 + Month([Date of Research])-1),(Format(
[Date of Research],"MMM 'YY"))
PIVOT [Plant and Machinery ID];
However my problem is that I can now not get the graph to produce several
lines in the graph it groups all the data in together as the though it is one
(lets say) product but I need a line for each Product. I think that this
comes from the PIVOT section of the original row source code. But PIVOT is
not recognised when I add it to the new code provided.
Thank you in advance for any reply i really really appreciate the responses.
Thank you
encountered errors when I tried running it from a query that used anything as
a criteria, i.e. a combo box or a text box etc; I posted this problem on this
site and received the instructions to insert the following in to my row
source column:
SELECT (Format([Date of Research],"MMM 'YY")) ,
Sum([New cost (Install)]) AS [Sum Of New cost (Install)]
FROM [GQ-IC]
WHERE [ANZIC] = [Forms]![Graph Selection]![combo13]
GROUP BY Year([Date of Research])*12 + Month([Date of Research])-1,
Format([Date of Research], "MMM 'YY");
Instead of:
TRANSFORM Sum([New cost (Install)]) AS [SumOfNew cost (Install)]
SELECT (Format([Date of Research],"MMM 'YY"))
FROM [GQ-GA-]
GROUP BY (Year([Date of Research])*12 + Month([Date of Research])-1),(Format(
[Date of Research],"MMM 'YY"))
PIVOT [Plant and Machinery ID];
However my problem is that I can now not get the graph to produce several
lines in the graph it groups all the data in together as the though it is one
(lets say) product but I need a line for each Product. I think that this
comes from the PIVOT section of the original row source code. But PIVOT is
not recognised when I add it to the new code provided.
Thank you in advance for any reply i really really appreciate the responses.
Thank you