PDA

View Full Version : Dependent Drop Down Populating Fields and Show/Hide Text



aggiefox
05-20-2015, 01:46 PM
I am trying to make a drop down list that will populate certain fields as well show/hide text. So far I have only gotten checkboxes to show/hide text. The application is a form that will have dependent drop downs that will populate a word document. A simplified example is below:

DropDown1: (car, Truck, Hybrid)
DropDown2:(diesel, gas, electric)
DropDown3:(4x4, 2x2)

These selections would then populate this type of form:

This form is to describe a (Diesel/Gas/Electric) (Car/truck/hybrid) that is (4x4,2x2).

Then a paragraph type description would be shown based on selection.

I hope this is clear, and look forward to any help.

Thanks,








Edited to disable smileys in example. SamT

gmayor
05-21-2015, 12:32 AM
If you wish to avoid macros, then you must use legacy form fields and a protected form such as that attached.
A more elegant solution would be to create a userform with three combo boxes to collect the selections http://www.gmayor.com/Userform.htm and populate the document as appropriate, but the users would have to run the macros and you cannot force them to do so.
See also http://www.gmayor.com/SelectFile.htm

aggiefox
05-21-2015, 08:59 AM
Graham,

Thank you very much, the legacy form fields look much cleaner. In order automatically to populate the paragraph text form field based on the previous selections would it be best to use an if then statement?

gmayor
05-21-2015, 09:48 PM
You cannot nest that many conditions. You need to setup a series of conditions all on the same line (i.e. with no paragraph of line break between them) as shown in the example document (Unlock the form and press ALT+F9 to view). You can insert paragraph breaks in the texts themselves, which would replace those shown in the example. Re-lock the form before using.

If working with formfields you will find this add-in invaluable: http://gregmaxey.mvps.org/word_tip_pages/add_classic_form_controls.html