S
SoggyCashew
Hello I have a query that works when I run the query but when I make a chart
it gives me an error. MS Jet database engine doesnt reconize
'[Forms]![frmSwitchboard]![cboCalYear]' as a valid field name or expression.
the row source for my chart is:
TRANSFORM Sum([CountOfAccidentTypeName]) AS [SumOfCountOfAccidentTypeName]
SELECT [Department] FROM [test] GROUP BY [Department] PIVOT
[AccidentTypeName];
And my querys SQL is:
SELECT tblDepartment.Department, tblAccidents.AccidentTypeName,
Count(tblAccidents.AccidentTypeName) AS CountOfAccidentTypeName
FROM tblDepartment INNER JOIN tblAccidents ON tblDepartment.DepID =
tblAccidents.Department
WHERE (((Year([DateOfAccident])) Like [Forms]![frmSwitchboard]![cboCalYear]))
GROUP BY tblDepartment.Department, tblAccidents.AccidentTypeName;
it gives me an error. MS Jet database engine doesnt reconize
'[Forms]![frmSwitchboard]![cboCalYear]' as a valid field name or expression.
the row source for my chart is:
TRANSFORM Sum([CountOfAccidentTypeName]) AS [SumOfCountOfAccidentTypeName]
SELECT [Department] FROM [test] GROUP BY [Department] PIVOT
[AccidentTypeName];
And my querys SQL is:
SELECT tblDepartment.Department, tblAccidents.AccidentTypeName,
Count(tblAccidents.AccidentTypeName) AS CountOfAccidentTypeName
FROM tblDepartment INNER JOIN tblAccidents ON tblDepartment.DepID =
tblAccidents.Department
WHERE (((Year([DateOfAccident])) Like [Forms]![frmSwitchboard]![cboCalYear]))
GROUP BY tblDepartment.Department, tblAccidents.AccidentTypeName;