I am having problems with a WHERE clause in my cross tab query. If I change it to a standard query or manually type in a value it works fine however the cross tab query will not work by refrancing it to a form.
It shows the number of people who answered each level of difficulty for each question. With the Answers along the top and question numbers down the side as below:
TRANSFORM Count(tbl_answers.Difficulty) AS CountOfDifficulty
SELECT tbl_questions.Number
FROM tbl_questions LEFT JOIN tbl_answers ON tbl_questions.Question_ID = tbl_answers.Question_No
WHERE (((tbl_answers.Questionnaire)=Forms![frm_main].test))
GROUP BY tbl_questions.Number, tbl_answers.Questionnaire
PIVOT tbl_answers.Difficulty;
However I only wish to show the results for a certain group of questionnaires hence the WHERE clause. I wish users to select the questionnaire by inputting it’s number into a text box on a form read by WHERE clause in the Query. If I manually type in a value in the query number it works but referencing to the form does not.
Can anyone help?