nederbragt
Technical User
I want to make the rowsource of a chart on a form variable.
I want to choose for wich product the chart must drawn.
I do have the next SQL statement.
TRANSFORM Count(qryCrediteringenVT.Product) AS
CountOfProduct
SELECT (Format([Datum],"mmm"" '""yy") AS Expr1
FROM qryCrediteringenVT
WHERE (((qryCrediteringenVT.Product)="Test"))
GROUP BY (Year([Datum])*12+Month([Datum])-1), (Format
([Datum],"mmm"" '""yy")
PIVOT qryCrediteringenVT.Product;
Can anyone help me to write this SQL statement in VBA, so I can make the criteria of the product variable ?
Any suggestions welcome, otherwise I have to make a new query for every new product.
I want to choose for wich product the chart must drawn.
I do have the next SQL statement.
TRANSFORM Count(qryCrediteringenVT.Product) AS
CountOfProduct
SELECT (Format([Datum],"mmm"" '""yy") AS Expr1
FROM qryCrediteringenVT
WHERE (((qryCrediteringenVT.Product)="Test"))
GROUP BY (Year([Datum])*12+Month([Datum])-1), (Format
([Datum],"mmm"" '""yy")
PIVOT qryCrediteringenVT.Product;
Can anyone help me to write this SQL statement in VBA, so I can make the criteria of the product variable ?
Any suggestions welcome, otherwise I have to make a new query for every new product.