View Full Version : Skipping questions in a form questionnaire


Ben McCall
06-22-2001, 12:31 PM
I have a form that asks question which are answered by my patients. If a specific answer for example is "no" I would like to have the command button that brings up the next question skip to a certain question number instead of the next question. I have been able to skip questions using:

DoCmd.GoToRecord acDataForm, "Questions and patient's answers2", acGoTo, 3

But I cannot get it to work conditionally using If Then Else End if statement.

Thanks for any help!

Ben McCall

dhoffman
06-22-2001, 01:33 PM
I'm not completely sure what your problem is. Perhaps try
If Me.[Answer Box] = "No" Then
blah blah blah

There's a good chance that doesn't answer your problem, so you'd have to be more specific.

Jack Cowley
06-22-2001, 01:59 PM
There is not quite enough information here. You can use dhoffmans approach, which is correct, but what you do if the answer is "No" depends on how your form is set up. You could make the proper questions Visible or you could set the Focus to the correct question. A bit more detail and I bet that someone will have the answer you are looking for.