K
Kurt
When I run a crosstab query (SQL below), I sometimes get
this error:
"This expression is typed incorrectly, or is it too
complex to be evaluated."
I can't seem to isolate what's causing this error, but it
seems to depend on how many or which fields I have data
for in the table. For example, if I enter more fields
into an existing record, or add more records, the query
usually works.
A few times, the error occured when I clicked on the
query from the database window, but it didn't occur when
I ran the query from design view. Weird.
I assume the WHERE clauses and/or use of qrySurveyDate
are contributing to the problem, because if I delete all
three WHERE clauses, the query always works. Likewise, if
I omit qrySurveyDate from the query (with or without the
WHERE statements), the query always works. However, I
need these to produce the data of interest.
Any ideas? - Kurt
SQL
--------------------------------------------------
TRANSFORM Count(tblResponses.Rspns) AS CountOfRspns
SELECT tblQuestions.QstnID, tblQuestions.QstnNum,
tblQuestions.QstnLvl1, tblQuestions.QstnLvl2,
tblQuestions.QstnText, tblResponses.Rspns
FROM tblQuestions INNER JOIN (qrySurveyDate INNER JOIN
tblResponses ON qrySurveyDate.RspnsID =
tblResponses.RspnsID) ON tblQuestions.QstnID =
tblResponses.QstnID
WHERE (((tblResponses.Rspns) Is Not Null) AND
((tblQuestions.RspnsType)<>5) AND
((tblQuestions.QstnType)="Stat"))
GROUP BY tblQuestions.QstnID, tblQuestions.QstnNum,
tblQuestions.QstnLvl1, tblQuestions.QstnLvl2,
tblQuestions.QstnText, tblResponses.Rspns
PIVOT "Number of Responses" In ("Number of Responses");
this error:
"This expression is typed incorrectly, or is it too
complex to be evaluated."
I can't seem to isolate what's causing this error, but it
seems to depend on how many or which fields I have data
for in the table. For example, if I enter more fields
into an existing record, or add more records, the query
usually works.
A few times, the error occured when I clicked on the
query from the database window, but it didn't occur when
I ran the query from design view. Weird.
I assume the WHERE clauses and/or use of qrySurveyDate
are contributing to the problem, because if I delete all
three WHERE clauses, the query always works. Likewise, if
I omit qrySurveyDate from the query (with or without the
WHERE statements), the query always works. However, I
need these to produce the data of interest.
Any ideas? - Kurt
SQL
--------------------------------------------------
TRANSFORM Count(tblResponses.Rspns) AS CountOfRspns
SELECT tblQuestions.QstnID, tblQuestions.QstnNum,
tblQuestions.QstnLvl1, tblQuestions.QstnLvl2,
tblQuestions.QstnText, tblResponses.Rspns
FROM tblQuestions INNER JOIN (qrySurveyDate INNER JOIN
tblResponses ON qrySurveyDate.RspnsID =
tblResponses.RspnsID) ON tblQuestions.QstnID =
tblResponses.QstnID
WHERE (((tblResponses.Rspns) Is Not Null) AND
((tblQuestions.RspnsType)<>5) AND
((tblQuestions.QstnType)="Stat"))
GROUP BY tblQuestions.QstnID, tblQuestions.QstnNum,
tblQuestions.QstnLvl1, tblQuestions.QstnLvl2,
tblQuestions.QstnText, tblResponses.Rspns
PIVOT "Number of Responses" In ("Number of Responses");