C
Claudette Hennessy
I am attempting to pass a parameter to a Crosstab query from a dialog form.
A report is created from the query, and embedded in another report as a
subform. i.e,
QuestionnaireReport
Various info.........
(Following is the report whose source is the X-tab query)
Event
Physicals Totals M
F
10 5
5
Choices for event selected from the dialog form combo box are "Physicals",
"Eye Tests", "Hearing Test", .......
The SQL for the X-Tab is
TRANSFORM Count(qryQuestionnaireResults.EventDate) AS CountOfEventDate
SELECT qryQuestionnaireResults.EventName, qryQuestionnaireResults.EventDate,
Count(qryQuestionnaireResults.EventDate) AS [Event Date Total]
FROM qryQuestionnaireResults
WHERE
(((qryQuestionnaireResults.EventName)=[Forms]![frmEventDialog]![cboEvent]))
GROUP BY qryQuestionnaireResults.EventName,
qryQuestionnaireResults.EventDate
PIVOT qryQuestionnaireResults.Gender;
If I substitute "Physicals" for [Forms]![frmEventDialog]![cboEvent], it
works fine. otherwise I get a "Microsoft Jet Engine does not recognize
Forms]![frmEventDialog]![cboEvent].
Can't I do this, or am I doing it wrong? How can I pass a value to the
CrossTab query at report time?
A report is created from the query, and embedded in another report as a
subform. i.e,
QuestionnaireReport
Various info.........
(Following is the report whose source is the X-tab query)
Event
Physicals Totals M
F
10 5
5
Choices for event selected from the dialog form combo box are "Physicals",
"Eye Tests", "Hearing Test", .......
The SQL for the X-Tab is
TRANSFORM Count(qryQuestionnaireResults.EventDate) AS CountOfEventDate
SELECT qryQuestionnaireResults.EventName, qryQuestionnaireResults.EventDate,
Count(qryQuestionnaireResults.EventDate) AS [Event Date Total]
FROM qryQuestionnaireResults
WHERE
(((qryQuestionnaireResults.EventName)=[Forms]![frmEventDialog]![cboEvent]))
GROUP BY qryQuestionnaireResults.EventName,
qryQuestionnaireResults.EventDate
PIVOT qryQuestionnaireResults.Gender;
If I substitute "Physicals" for [Forms]![frmEventDialog]![cboEvent], it
works fine. otherwise I get a "Microsoft Jet Engine does not recognize
Forms]![frmEventDialog]![cboEvent].
Can't I do this, or am I doing it wrong? How can I pass a value to the
CrossTab query at report time?