Help with dropdown on form

M

Mary Anne

I'm not sure if this is the correct forum, but I didn't
see one for Word forms. I have used VBA extensively in
Access, but I've never used it for Word. I have a Word
form with a dropdown field. I would like the dropdown box
to show two columns, but record only the value. I want it
to show: Always 3
 
M

mary anne

I'm not sure if this is the correct forum, but I didn't
see one for Word forms. I have used VBA extensively in
Access, but I've never used it for Word. I have a Word
form with a dropdown field. I would like the dropdown box
to show two columns, but record only the value. I want it
to show: Always 3
Sometimes 1
Never 0
but just record the 3, 1 or 0.
In Access, it would just be a property of a combo box. Is
there something similar in Word? THere are too many
people who don't use Access that this is going to and I
need to make it as simple as possible.
 
P

Peter Hewett

Hi mary anne

Set the ComboBox's BoundColumn property, and retrieve the value stored in the
other column using the Value property. So by default to retun the contents of
column 2 (even though only displaying column 1:

cboTest.BoundColumn = 2

and
MsgBox "Value stored in the selected rows column 2 " & cboTest.Value

HTH + Cheers - Peter
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

Hi Mary Anne,

You cannot have multiple columns in a DropDown formfield. You can however
have them in a combobox or a listbox on a userform.

See the article “How to create a Userform” at:

http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top