M
mattc66 via AccessMonster.com
I have created a Chart. I want to add a button to my form and pull up the
chart. The data will be based on an item on the form. How would I change the
charts crosstab query to be based on the item from my form? It would require
the Where Criteria to be based on a variable from my form. See below -
"xxxxx" would be the Item number from my form.
TRANSFORM Sum(qryItemsConsumed.USED) AS SumOfUSED
SELECT qryItemsConsumed.SORT1 AS PERIODS
FROM qryItemsConsumed
WHERE (((qryItemsConsumed.ITEM)="xxxxx"))
GROUP BY qryItemsConsumed.SORT1
ORDER BY qryItemsConsumed.SORT1 DESC
PIVOT qryItemsConsumed.ITEM;
chart. The data will be based on an item on the form. How would I change the
charts crosstab query to be based on the item from my form? It would require
the Where Criteria to be based on a variable from my form. See below -
"xxxxx" would be the Item number from my form.
TRANSFORM Sum(qryItemsConsumed.USED) AS SumOfUSED
SELECT qryItemsConsumed.SORT1 AS PERIODS
FROM qryItemsConsumed
WHERE (((qryItemsConsumed.ITEM)="xxxxx"))
GROUP BY qryItemsConsumed.SORT1
ORDER BY qryItemsConsumed.SORT1 DESC
PIVOT qryItemsConsumed.ITEM;