I have a query that works based upon a form selection. The query works when I select an item in all of the relevant combo boxes but if I do not select one option I get an error stating that the query expression is too complicated.
The SQL looks like this:
Code:
SELECT tbl_exam_board.exam_board_id, tbl_specification.specification_id, tbl_unit.unit_id, tbl_topic.topic_id, tbl_exam_paper.exam_paper_id, tbl_question.question_id, tbl_question.txt_question_number
FROM tbl_topic INNER JOIN ((((tbl_exam_board INNER JOIN tbl_exam_paper ON tbl_exam_board.exam_board_id = tbl_exam_paper.exam_board_id) INNER JOIN tbl_specification ON tbl_exam_board.exam_board_id = tbl_specification.exam_board_id) INNER JOIN tbl_question ON tbl_exam_paper.exam_paper_id = tbl_question.exam_paper_id) INNER JOIN tbl_unit ON tbl_specification.specification_id = tbl_unit.num_specification_id) ON (tbl_unit.unit_id = tbl_topic.num_unit_id) AND (tbl_topic.topic_id = tbl_question.topic_id)
WHERE (((tbl_exam_board.exam_board_id)=[forms]![frm_switchboard].[drpdwn_exam_board]));
So, how do I get this to work so that the user can opt to leave a combo box empty and the query therefore treat this combo box as being *?