tmd63
Hobbyist relational database creator
- Local time
- Today, 23:33
- Joined
- Oct 26, 2016
- Messages
- 22
I have a query that works fine when there is data in both tables, but not when there is no records in tblTest.
tblTest does not have a relationship with tblQuestions but does store the QuestionID once an test question is selected. But at the start of the Test, the tblTest table is empty. At this point, no questions are being displayed because of the 'From tblQuestions, tblTest' entry. If I remove tblTest the question appear. However I need to restrict the questions to ones not selected before (hence the test tblQuestionsID<>tblTest.lngQuestionID).
Any suggestions on how to make the questions appear when tblTest is empty?
Code:
SELECT tblQuestions.ID, tblQuestions.Question, tblQuestions.Module
FROM tblQuestions, tblTest
WHERE (((tblQuestions.ID)<>[tblTest].[lngQuestionID]) AND ((tblQuestions.Module)=[Forms]![frmTest]![cboModule]));
tblTest does not have a relationship with tblQuestions but does store the QuestionID once an test question is selected. But at the start of the Test, the tblTest table is empty. At this point, no questions are being displayed because of the 'From tblQuestions, tblTest' entry. If I remove tblTest the question appear. However I need to restrict the questions to ones not selected before (hence the test tblQuestionsID<>tblTest.lngQuestionID).
Any suggestions on how to make the questions appear when tblTest is empty?