Branching in a Microsoft Word form

I would like to create a form that allows for branching.  For example: Depending on the answer to question 1, it will allow you to proceed to the next question, and so on.  If the any question does not meet the criteria, the applicant is alerted that they do not meet the criteria, and the form is closed out.

This could certainly be done.  How, is a design decision and depending on that decision could take a considerable amout of time to develop.  Your starting point would probably be the Exit event of the control receiving the answer.

 

Greg Maxey
***
Death smiles at us all, but all a man can do is smile back.


For more help with Word visit:
http://gregmaxey.com/word_tips.html

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

If you are using a Userform, one possibility would be to use the .tag property of your controls (radio button, checkbox, etc). For simple branching like what you describe, set the control tags for correct answers to true, and the wrong answers to false, then write a small bit of code to loop to find the selected control(s), and then check their tags. If any are false, close the form out and exit, otherwise continue to the next question as planned. Personally I'd probably use something like a multipage control and just show/hide subsequent pages (vs. actually hiding and showing individual controls and questions).

 

If you need a more sophisticated branching, you could have each tag reference where the user should go next; for example:

 

What is your field of study?

(a) Physics <tag: academic careers>

(b) CSE <tag: programming careers>

(c) Nursing <tag: hospital careers> 

(d) Liberal arts <tag: fast food careers>


Then your code can read the tag, and move the user to the appropriate next step in the tree.

 

HTH

2 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated March 2, 2024 Views 2,798 Applies to: