I have the following table (tblQuestions) structure and example data for a survey database:
The RespType field defines whether the question can be answered Y/N (RespType = 1) or Y/N/NA (RespType = 2). A blank RespType means that the combobox for answers is populated from tblResponses that is related to tblQuestions on the QstnID field. The blank RespType is always on the sub-question; a person will answer the main question with Y, N, or NA and then in the sub question select additional details as defined in the tblResponses table for that particular question. Not all questions have a sub-question, however.
What I am trying to query is the QstnID of those sub-questions where the main question RespType is 2, so I can add NA options to the tblResponses for the sub-questions whose main question has an NA option.
Is that possible with this table structure? how would I do that? So far none of my queries have returned any results, or not the results I'm looking for.
Code:
QstnID(PK), QstnNum, SubQstnID, RespType, QstnText
1,1,A,1,Text of Question
2,1,B,Blank,Text of Sub-question
What I am trying to query is the QstnID of those sub-questions where the main question RespType is 2, so I can add NA options to the tblResponses for the sub-questions whose main question has an NA option.
Is that possible with this table structure? how would I do that? So far none of my queries have returned any results, or not the results I'm looking for.