Now for each responseField we need to set its rightAnswer property. Click on a responseField to select it. In the Inspector scroll down to the Behavior section and enter the correct answer as the rightAnswer property as shown below. Do this for all 5 responseFields.



Step 3 – Scoring the Quiz

Now it is time to add a means of scoring to the quiz. Part of the scoring system has already been added. It is the code we put into the TextChange event of our custom contol “answerField”.



In the Action event of the Check Answer pushbutton put the following code.


This code checks each responseField’s “result” property. If this property is true 1 is added to the ‘score”. If “result” is false nothing is added to “score”. Finally, the score is displayed using a msgBox.


Page 3