Hi~ I am a newbie to Access (started about 3 wks ago). The project I am working on is to store data from surveys. I have 4 tables:
· tblQuestions (the survey questions);
· tblAnswers (the possible answers to the questions);
· tblIndividualSurvey (stores date, location, and comments for each survey we receive);
· tblResponse (the answers given by the participant).
The form that we use to enter the survey responses has a main form for the data that goes into the tblIndividualSurvey and a subform for the data that goes into the tblReponse. The subform consists of two controls: 1) question field 2) answer field, both are combo boxes. The question field Row Source is:
SELECT tblQuestions.QID,
[QNumber] & " " & [Question] AS Expr1
FROM tblQuestions
The answer field Row Source is:
SELECT tblAnswers.AID,
tblAnswers.Answer,
tblAnswers.QID
FROM tblAnswers
WHERE (((tblAnswers.QID)=[Forms]![frmIndividualSurvey]![sfrmResults].[Form]![QID]));
The question field has the following code on the On Focus and On Exit events:
Private Sub …
Me.answerID.Requery
End Sub
When we key in the question number, it displays the question in the question field. When we tab across to the answer field, the possible answers are available and we can select the available answer. The selected answer updates properly in the tblResponse table.
Here’s the problem – after we tab out of the answer field into the next question, the answer to the previous question remains on the screen (just like we want it to). But when we enter the next question, the answer to the previous question no longer displays. If we click on a previous question, the associated answer displays.
Here’s my question - the questions continue to be displayed even when we aren’t on that field any more. How do I keep the value for each answer displaying on the screen?
TIA!
· tblQuestions (the survey questions);
· tblAnswers (the possible answers to the questions);
· tblIndividualSurvey (stores date, location, and comments for each survey we receive);
· tblResponse (the answers given by the participant).
The form that we use to enter the survey responses has a main form for the data that goes into the tblIndividualSurvey and a subform for the data that goes into the tblReponse. The subform consists of two controls: 1) question field 2) answer field, both are combo boxes. The question field Row Source is:
SELECT tblQuestions.QID,
[QNumber] & " " & [Question] AS Expr1
FROM tblQuestions
The answer field Row Source is:
SELECT tblAnswers.AID,
tblAnswers.Answer,
tblAnswers.QID
FROM tblAnswers
WHERE (((tblAnswers.QID)=[Forms]![frmIndividualSurvey]![sfrmResults].[Form]![QID]));
The question field has the following code on the On Focus and On Exit events:
Private Sub …
Me.answerID.Requery
End Sub
When we key in the question number, it displays the question in the question field. When we tab across to the answer field, the possible answers are available and we can select the available answer. The selected answer updates properly in the tblResponse table.
Here’s the problem – after we tab out of the answer field into the next question, the answer to the previous question remains on the screen (just like we want it to). But when we enter the next question, the answer to the previous question no longer displays. If we click on a previous question, the associated answer displays.
Here’s my question - the questions continue to be displayed even when we aren’t on that field any more. How do I keep the value for each answer displaying on the screen?
TIA!