Chart "valid name or expression" problem

Badvoc

Registered User.
Local time
Today, 11:18
Joined
Apr 22, 2009
Messages
69
I’m trying to create a chart in a report that shows how much time each team in our department spends on a task.
The chart is yearly split into months showing each team in each month.

If I set my query for the chart like this:

SELECT qryMNonEngRptTm.SumOfDuration, qryMNonEngRptTm.Dept, qryMNonEngRptTm.Team, MonthName([Monthofactivities]) AS [Month], qryMNonEngRptTm.monthofactivities, qryMNonEngRptTm.Year
FROM qryMNonEngRptTm
WHERE (((qryMNonEngRptTm.Year)="2009"))
GROUP BY qryMNonEngRptTm.SumOfDuration, qryMNonEngRptTm.Dept, qryMNonEngRptTm.Team, MonthName([Monthofactivities]), qryMNonEngRptTm.monthofactivities, qryMNonEngRptTm.Year
ORDER BY qryMNonEngRptTm.monthofactivities;

The query and report chart work fine, but for only the year specified by WHERE (ie “2009”)
I need to have the user choose which year is shown from the form frm_nonengactrptfrm

So I changed the query to this:

SELECT qryMNonEngRptTm.SumOfDuration, qryMNonEngRptTm.Dept, qryMNonEngRptTm.Team, MonthName([Monthofactivities]) AS [Month], qryMNonEngRptTm.monthofactivities, qryMNonEngRptTm.Year
FROM qryMNonEngRptTm
WHERE (((qryMNonEngRptTm.Year)=[forms]![frm_nonengactrptfrm]![text9]))
GROUP BY qryMNonEngRptTm.SumOfDuration, qryMNonEngRptTm.Dept, qryMNonEngRptTm.Team, MonthName([Monthofactivities]), qryMNonEngRptTm.monthofactivities, qryMNonEngRptTm.Year
ORDER BY qryMNonEngRptTm.monthofactivities;

Text9 is a combobox with a row source type (Value list) with the row source 2008;2009;2010;2011;2012

When I try it this user friendly way the query will ok but the chart in the report will not, I get the error message (The Microsoft Jet database engine does not recognize ‘[forms]![frm_nonengactrptfrm]![text9]’ as a valid name or expression.

How can I get this to work?
 
Try a dot instead of the bangs. Sometimes the bangs are not liked.
 
Tried that Kryst51,
the duplicate posts before where down to my network play silly buggers and timing out all the time:)
 
I figured about the duplicate posts. If it does that again, just know that the post usually happens even if your side doesn't show it. Cooky forum.:p
 

Users who are viewing this thread

Back
Top Bottom