#1
|
|||
|
|||
Pre-Populated fields
I am trying to generate a form with multiple fields - with some fields to pre-populate field values, based on the value selected in another field drop down.
For example: if System = AS400, then queues impacted = NA but if System = Genesys, then queues impacted allow user to input data via a text field Lookup Values of System will be predefined. Please advise. Thanks in advance... |
#2
|
||||
|
||||
Sorry, I missed this the other day
What you propose is easy enough with content controls. You need a list box to make the selection, a rich text control for the related value and a macro to evaluate the selection(s) and fill the text control(s) appropriately. You may find Insert Content Control Add-In useful. The macro must go in the ThisDocument module of the form template and would be something like: Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean) Dim oCC As ContentControl With ContentControl If .ShowingPlaceholderText = False Then Select Case .Title Case Is = "System" Set oCC = ActiveDocument.SelectContentControlsByTitle("Queues Impacted").Item(1) Select Case .Range.Text Case Is = "AS400" oCC.Range.Text = "NA" Case Is = "Genesys" oCC.Range.Text = "" End Select Case Else End Select End If End With Set oCC = Nothing End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Tags |
form fields, word 365 |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Check Form fields populated before save | OTPM | Word | 12 | 03-10-2017 11:13 PM |
copying one populated template to another | caz46 | PowerPoint | 0 | 02-27-2017 05:04 AM |
Naming Documents From Populated Cells | TYPOGRAPHICS | Word VBA | 8 | 04-08-2016 09:13 AM |
Please Help! Need auto populated last saved date. | Neveradayoff | Excel | 0 | 02-05-2014 09:42 AM |
Drop-down Populated with text entry | ReviTULize | Word VBA | 14 | 02-21-2013 07:06 PM |