Chart in a Form - can't pass a value

Joined
Feb 28, 2006
Messages
1
Reaction score
0
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top