D
Dave
I have 3 graphs to create on a report. The graph and data are simple to do,
but my question pertains to using one query to loop through and have each
graph then created. The graph depicts the value of each element under a
product. So the intent is to show from low to high which element is
contributing to the low score for the lowest 3 products. I created a form to
capture some of the data in advance. Can a report run the query and update
individual graphs without upsetting the previous graph? Believe I have
solved looping through a query - maybe. Basically this report is used to
drill-down to depict the poor performers under each product.
The query below pulls in the data for a product with criteria including a
date plus the ProductID is taken from a textbox on the form. The form can
change the productID so can the graph update as I change the IDs?
SELECT tblIndex.Element AS Element, Avg(tblRatios.percent) AS Avgpcnt
FROM tblIndex INNER JOIN tblRatios ON tblIndex.RecordID = tblRatios.RecordID
WHERE (((tblIndex.RecordDate)=[Forms]![frmGraphs]![axcDate]))
GROUP BY tblIndex.Element, tblIndex.ProductID
HAVING (((tblIndex.ProductID)=[Forms]![frmGraphs]![txtIndex]))
ORDER BY Avg(tblRatios.percent);
Is this even the correct approach? My intent is to keep the file size from
bloating by not creating a specific query for every circumstance and the
technical chanllenge is fun.
Dave
Thank you very much for your help and suggestions.
but my question pertains to using one query to loop through and have each
graph then created. The graph depicts the value of each element under a
product. So the intent is to show from low to high which element is
contributing to the low score for the lowest 3 products. I created a form to
capture some of the data in advance. Can a report run the query and update
individual graphs without upsetting the previous graph? Believe I have
solved looping through a query - maybe. Basically this report is used to
drill-down to depict the poor performers under each product.
The query below pulls in the data for a product with criteria including a
date plus the ProductID is taken from a textbox on the form. The form can
change the productID so can the graph update as I change the IDs?
SELECT tblIndex.Element AS Element, Avg(tblRatios.percent) AS Avgpcnt
FROM tblIndex INNER JOIN tblRatios ON tblIndex.RecordID = tblRatios.RecordID
WHERE (((tblIndex.RecordDate)=[Forms]![frmGraphs]![axcDate]))
GROUP BY tblIndex.Element, tblIndex.ProductID
HAVING (((tblIndex.ProductID)=[Forms]![frmGraphs]![txtIndex]))
ORDER BY Avg(tblRatios.percent);
Is this even the correct approach? My intent is to keep the file size from
bloating by not creating a specific query for every circumstance and the
technical chanllenge is fun.
Dave
Thank you very much for your help and suggestions.