![]() |
#1
|
|||
|
|||
![]()
I have a simple form with most fields using Plain Text Content Control. A few use Date Picker Content Control. The only other one I use is Drop-Down List Content Control for choice of names and for their addresses.
If the person filling in the form wishes to enter the date themselves they can simply click in the box and type the date, ignoring the option of the arrow that allows selection from a calendar. However, if the person does not find the name they want in the Drop-Down List Content Control, they can't enter any data as you can with the date field. Is there any way of allowing the user to either pick a name from the list or enter their own name? Secondly, rather than have to select the address that goes with the name in the next field, can I automatically fill in the address that goes with the name, other than just using a single box for both name and address? If this single box method is the only way, how do I insert carriage returns into the lines of the address. (Tried ^p - doesn't work!). Many thanks for considering my questions. Ian |
#2
|
||||
|
||||
![]()
Use a combo box rather than a list box to allow the user to enter values not in the list.
You will need macros to automatically insert addresses associated with listed items, but that creates other issues when using a combo box to allow users to enter a name, which is thus unlikely to be associated with an address. If you want multiple lines, you need a text box control. There is a lot of useful information on content controls on Greg Maxey's web site - start with the basics at http://gregmaxey.com/word_tip_pages/..._controls.html then move on to http://gregmaxey.com/word_tip_pages/...om_events.html
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
||||
|
||||
![]()
You can use a macro to allow the user to add an entry to the dropbox. An example would be
Code:
Private Sub Document_ContentControlOnExit(ByVal aCC As ContentControl, Cancel As Boolean) Dim sName As String If aCC.Range.Text = "Add another..." Then sName = InputBox("What name do you want to add?") aCC.DropdownListEntries.Add sName aCC.Range.Text = sName End If End Sub A return in vbaspeak is usually vbCr instead of ^p aString = "some text" & vbCr & "some more text"
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#4
|
|||
|
|||
![]()
Thank you Gents.
|
![]() |
Tags |
content control, forms |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Form with content controls - expands but at the bottom of the form | louiseword | Word | 3 | 05-27-2016 12:47 AM |
![]() |
pluqk | Word | 1 | 11-19-2015 07:23 PM |
Form Controls - Calculation Options | Perk | Word | 17 | 09-18-2015 06:55 AM |
![]() |
inq80 | Excel | 2 | 10-17-2014 08:05 AM |
Word Forms - Active X Controls - Drop Down Menu Value Assignments | AMackenzieFFCU | Word | 0 | 01-04-2013 08:25 AM |