#1
|
|||
|
|||
Combo Box and AutoFill
Hey!
I having been reading this and can't find a conclusive answer. I want to create a form that contains a combo box. When Q1 is selected I want it to auto fill January, February, March. I'd love it to do the same thing for Q2/Q3/Q4. Is this possible? Thanks, Sam |
#2
|
|||
|
|||
What kind of fields? Your graphic looks like formfields, but there is no combo box in the formfield collection.
|
#3
|
|||
|
|||
Hi!
I created these as Combo Boxes. I've uploaded an example of what I am looking to do as an attachment also if that helps. Thanks, Sam |
#4
|
|||
|
|||
Sam,
I don't know where that user interface came from but that is not a combobox it is a dropdown formfields. Comboboxes let you type in alternate text not part of the list. You will need to set a macro to run on exit from the dropdown: Code:
Sub ConvertQtrToMonths() With ActiveDocument .FormFields("Text1").Enabled = True .FormFields("Text1").Enabled = True .FormFields("Text1").Enabled = True Select Case .FormFields("Dropdown1").Result Case "Q1" .FormFields("Text1").Result = "January" .FormFields("Text2").Result = "February" .FormFields("Text3").Result = "March" Case "Q2" .FormFields("Text1").Result = "April" .FormFields("Text2").Result = "May" .FormFields("Text3").Result = "June" Case "Q3" Case "Q4" End Select ' .FormFields("Text1").Enabled = False ' .FormFields("Text1").Enabled = False ' .FormFields("Text1").Enabled = False End With lbl_Exit: Exit Sub End Sub |
#5
|
|||
|
|||
Hi Gmaxey! This is amazing, thank you so much.
Out of interest, I have to click on the text boxes in order to get it to work (see attached Video). Is there a way around this, or is it the behaviour of word? |
#6
|
|||
|
|||
It isn't that you have to click on one of the text boxes, but you have to exit the dropdown field. If those three text boxes are the only other formfields in the document then clicking one of them is the only exit point available.
|
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Autocomplete With Combo Box | JPMontoya | Word | 1 | 12-08-2015 01:41 PM |
Creating AutoFill form - AutoFill information depending on a selection. | RyanHarper | Word | 3 | 06-15-2015 01:01 PM |
Combo Box Items | BoringDavid | Word VBA | 12 | 12-12-2013 05:14 AM |
Combo Box | Hinchy | Word | 4 | 09-04-2012 05:31 AM |
Hide a combo box | DrewB | Word | 3 | 06-08-2009 11:29 PM |