Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-01-2016, 03:42 AM
samrosen samrosen is offline Combo Box and AutoFill Mac OS X Combo Box and AutoFill Office 2016
Novice
Combo Box and AutoFill
 
Join Date: Aug 2016
Posts: 3
samrosen is on a distinguished road
Default 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
Attached Images
File Type: png Screen Shot 2016-08-01 at 11.39.40.png (16.4 KB, 29 views)
File Type: png Screen Shot 2016-08-01 at 11.39.44.png (12.1 KB, 29 views)
Reply With Quote
  #2  
Old 08-01-2016, 03:10 PM
gmaxey gmaxey is offline Combo Box and AutoFill Windows 7 32bit Combo Box and AutoFill Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,421
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

What kind of fields? Your graphic looks like formfields, but there is no combo box in the formfield collection.
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #3  
Old 08-02-2016, 12:55 AM
samrosen samrosen is offline Combo Box and AutoFill Mac OS X Combo Box and AutoFill Office 2016
Novice
Combo Box and AutoFill
 
Join Date: Aug 2016
Posts: 3
samrosen is on a distinguished road
Default

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
Attached Images
File Type: png Screen Shot 2016-08-02 at 08.54.26.png (89.1 KB, 23 views)
Attached Files
File Type: docx Quarter Test.docx (24.5 KB, 10 views)
Reply With Quote
  #4  
Old 08-02-2016, 07:55 AM
gmaxey gmaxey is offline Combo Box and AutoFill Windows 7 32bit Combo Box and AutoFill Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,421
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

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
If there is another field in your form then you can disable the three month text boxes. Otherwise you have to leave at least one enable so you will have somewhere to exit to.
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #5  
Old 08-03-2016, 04:01 AM
samrosen samrosen is offline Combo Box and AutoFill Mac OS X Combo Box and AutoFill Office 2016
Novice
Combo Box and AutoFill
 
Join Date: Aug 2016
Posts: 3
samrosen is on a distinguished road
Default

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?
Attached Files
File Type: zip Macro v2.mp4.zip (343.1 KB, 12 views)
Reply With Quote
  #6  
Old 08-03-2016, 05:12 AM
gmaxey gmaxey is offline Combo Box and AutoFill Windows 7 32bit Combo Box and AutoFill Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,421
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

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.
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo Box and AutoFill 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 and AutoFill Combo Box Items BoringDavid Word VBA 12 12-12-2013 05:14 AM
Combo Box and AutoFill Combo Box Hinchy Word 4 09-04-2012 05:31 AM
Combo Box and AutoFill Hide a combo box DrewB Word 3 06-08-2009 11:29 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:28 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft