Doug
Sun Feb 06 07:36:56 CST 2005
You did not show us the code for the macro that you are using, but there is
a problem with this sort of thing which is, what happens if the user needs
to change their selection? Can you live with a separate textbox being
populated with the code corresponding to the item selected in the DropDown
formfield?
Maybe you should be using a UserForm with a two column combobox or listbox
in it and then have the document populated with whatever it needs to be when
the user clicks on a command button on the form.
See the article "How to create a Userform" at:
http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm
--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.
Hope this helps,
Doug Robbins - Word MVP
"kimee11972" <kimee11972@discussions.microsoft.com> wrote in message
news:A1CF4E43-AF80-42F3-ABEB-E1EE0905B877@microsoft.com...
> I've created a form and am having trouble getting the drop-down boxes to
> behave like I want them too.
>
> The user of the form should select an item from the drop down box, but I
> want the result to be a code for the item. So, for example, if the user
> chooses the item "black," once he/she tabs out of the field, the code
> "blk"
> should populate that field. This will be true of most of the drop down
> boxes
> in my form. I do not want to use the code itself in the drop down list,
> because in most cases, the correlation will not be this simple.
>
> I've tried a macro to accomplish this, and though the behavior is correct,
> once the user moves out of the field, the result code (i.e. "blk") is
> added
> to the list of available items in the drop down box.
>
> Any ideas?