Form fields: update next field & keyboard operation

D

Dan Fingerman

Two questions about form fields:

1. I am designing a form to be used in a small office (six employees).
One field is a drop-down list of employees' names. The next field is
a text box that will contain the extension of the person named in the
first field. I would like the second field to be automatically filled
in with the appropriate extension after the user selects his name.
How can I do this? (If possible, I would also like the second field
to be skipped when the user is "tabbing" through the fields.)

2. Is there a way to allow users to select a name from the drop-down
list using the keyboard after "tabbing" to that field? Word seems to
require use of the mouse, and I cannot find any options that would
permit keyboard-only operation.

Thanks in advance!
 
D

Doug Robbins - Word MVP

Hi Dan,

If you have an autotext entry containing the extension number corresponding
to each name, then you could use a modification of the following in a macro
run on exit from the dropdown:

' Macro created 15-11-97 by Doug Robbins to add the address corresponding to
a drop down name
'
Set myDrop = ActiveDocument.FormFields("Dropdown1").DropDown
Company = myDrop.ListEntries(myDrop.Value).Name
Address = ActiveDocument.AttachedTemplate.AutoTextEntries(Company).Value
ActiveDocument.FormFields("Text1").Result = Address

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