Hi,
I've been playing with this for a couple of days now and having no luck.
I'm writing management reports for a multibranch company, so want to pass the branch thru to display the relevant data on the chart. On my control form the user selects the branch they want to display, then open a number of other forms using Command buttons to display various bits of info. I can pass thru the branch to a text box, but I can't get the chart to use this. I have a query (qry.Yield) which runs fine and allows me to select the branch using [Forms]![Control]![Branch], but as soon as I try to make a chart on this I have no luck.
My chart SQL is
TRANSFORM Max(qry_Yield.data) AS MaxOfdata
SELECT (Format([Date],"mmm"" '""yy")) AS Expr1
FROM qry_Yield
WHERE (((qry_Yield.[Bussiness Unit])="M16"))
GROUP BY (Year([Date])*12+Month([Date])-1), (Format([Date],"mmm"" '""yy")), qry_Yield.[Bussiness Unit]
PIVOT qry_Yield.type;
I want to have Business unit as a variable not just M16, but passing thru the [Forms]![Control]![Branch] doesn't work...
Any help would be most appreciated.
Thanks,
Rose
I've been playing with this for a couple of days now and having no luck.
I'm writing management reports for a multibranch company, so want to pass the branch thru to display the relevant data on the chart. On my control form the user selects the branch they want to display, then open a number of other forms using Command buttons to display various bits of info. I can pass thru the branch to a text box, but I can't get the chart to use this. I have a query (qry.Yield) which runs fine and allows me to select the branch using [Forms]![Control]![Branch], but as soon as I try to make a chart on this I have no luck.
My chart SQL is
TRANSFORM Max(qry_Yield.data) AS MaxOfdata
SELECT (Format([Date],"mmm"" '""yy")) AS Expr1
FROM qry_Yield
WHERE (((qry_Yield.[Bussiness Unit])="M16"))
GROUP BY (Year([Date])*12+Month([Date])-1), (Format([Date],"mmm"" '""yy")), qry_Yield.[Bussiness Unit]
PIVOT qry_Yield.type;
I want to have Business unit as a variable not just M16, but passing thru the [Forms]![Control]![Branch] doesn't work...
Any help would be most appreciated.
Thanks,
Rose