I have a form that contains the a question with 3 multiple choice answers. The form records the persons answer as 'Answer1' and also holds a copy of the correct answer called 'Correct'. If I use the following code behind a button on the form then it works but when there are no more questions left then there is just a blank form. Therefore I tried putting a WHILE statement around it so that it runs only 3 times (for the three questions in the database) but that did not work. I want to run the code below for the three questions but then once the person has gotten them correct I want to do a further action (open a new form)
If Correct = Answer1 Then
DoCmd.RunMacro "correct answer"
Else
DoCmd.RunMacro "incorrect answer"
End If
PS the macros simply show msg box saying correct or incorrect and if correct then move to next record.
Many thanks for your help
If Correct = Answer1 Then
DoCmd.RunMacro "correct answer"
Else
DoCmd.RunMacro "incorrect answer"
End If
PS the macros simply show msg box saying correct or incorrect and if correct then move to next record.
Many thanks for your help