A bit confused. This is what I have.
3 x Addresses are added to Autotext
In Drop-Down Form Field #1 the following items are added: A Smith, B
Smith, C Smith
In Drop-Down Form Field #2 the following Items are added: A Street, B
Street, C Street
Drop-Down Form Field #1 Runs macro below On Exit
Dim myDrop As DropDown
Dim myName As String
Set myDrop =3D ActiveDocument.FormFields("name").DropDown
myName =3D myDrop.ListEntries(myDrop.Value).Name
Address =3D
ActiveDocument.AttachedTemplate.AutoTextEntries(myName).Value
ActiveDocument.FormFields("address").Result =3D Address
Do I have to add the actual name and address into this macro and
repeat 3 x times per name and address, for example:
Dim myDrop As DropDown
Dim myName As String
Set myDrop =3D ActiveDocument.FormFields("A Smith").DropDown
myName =3D myDrop.ListEntries(myDrop.Value).Name
Address =3D
ActiveDocument.AttachedTemplate.AutoTextEntries(myName).Value
ActiveDocument.FormFields("A Address").Result =3D Address
Dim myDrop As DropDown
Dim myName As String
Set myDrop =3D ActiveDocument.FormFields("B Smith").DropDown
myName =3D myDrop.ListEntries(myDrop.Value).Name
Address =3D
ActiveDocument.AttachedTemplate.AutoTextEntries(myName).Value
ActiveDocument.FormFields("B Address").Result =3D Address
Dim myDrop As DropDown
Dim myName As String
Set myDrop =3D ActiveDocument.FormFields("C Smith").DropDown
myName =3D myDrop.ListEntries(myDrop.Value).Name
Address =3D
ActiveDocument.AttachedTemplate.AutoTextEntries(myName).Value
ActiveDocument.FormFields("C Address").Result =3D Address
Thanks
On Feb 27, 6:20=A0pm, "Doug Robbins - Word MVP"
> If you have the addresses stored as autotext entries in the template YES
> with the "name" of the autotext entry being the name as listed in the Drop=
Down
> FormFields, the following code run on exit from the DropDown Formfield
>
> ' Macro created 15-11-97 by Doug Robbins to add the address corresponding =
to
> a drop down name
>
> Dim myDrop As DropDown
> Dim myName As String
> Set myDrop =3D ActiveDocument.FormFields("Name").DropDown
> myName =3D myDrop.ListEntries(myDrop.Value).Name
> Address =3D ActiveDocument.AttachedTemplate.AutoTextEntries(myName).Value
> ActiveDocument.FormFields("Address").Result =3D Address
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "hermithead"
>
> news:caa426b4-5772-4d48-b144-fb9802fce99b@n75g2000hsh.googlegroups.com...
>
>
>
> > Hi, This macro works fine
> >http://gregmaxey.mvps.org/Linked_DropDown_Fields.htm
> > however is it possible to modify this so the second field Auto
> > Populates based on the selection of the first drop down box?
> > At present the user has to manually click in the second field and
> > select from a list. In my case my list only needs to contain one
> > choice. Eg. My first drop down list includes a list of names: John
> > Smith, Bob Smith, Fred Smith which correspond to each of their own
> > postal addresses. So If I select Bob Smith then the second field
> > should auto populate with his address and so forth. This doesnt happen
> > in the macro above can anyone suggest how this second field can be
> > auto populated. Thanks.- Hide quoted text -
>
> - Show quoted text -