Reply
 
Thread Tools Display Modes
  #1   Report Post  
HT
 
Posts: n/a
Default Creating a form..drop-down should populate other fields

Microsoft Word 2003
WindowsXP

I am creating a form that has a drop-down menu. The drop-down menu has a
list of names. I want to be able to choose the drop-down menu name and have
the fields that ask for the phone number and work hours to automatically
populate once you choose the person's name.

For instance: John Smith works 9:00-5:00 and his phone number is
(555)555-5555.

I want to be able to choose John Smith and have the phone number, works
hours immediately input in the fields.

If I ever get this part done I want to be able to click on a button and have
all of the text copy to the clipboard and paste into the body of an e-mail.

Thanks all!


  #2   Report Post  
Greg
 
Posts: n/a
Default

Very similiar question asked and answered a few days ago:

You can't just select the name. You have to select the name then exit
the field with a macro set to run on exit from that field. Something
like:

Sub Fillin()
Dim oDoc As Document
Set oDoc =3D ActiveDocument
Select Case oDoc.FormFields("DropDown1").R=ADesult
Case Is =3D "Sheila"
oDoc.FormFields("Text1").Resul=ADt =3D "321-1234"
oDoc.FormFields("Text2").Resul=ADt =3D "
Case Is =3D "Greg"
oDoc.FormFields("Text1").Resul=ADt =3D "987-6754"
oDoc.FormFields("Text2").Resul=ADt =3D "
Case Else
oDoc.FormFields("Text1").Resul=ADt =3D "???-????"
oDoc.FormFields("Text2").Resul=ADt =3D "
End Select=20
End Sub

  #3   Report Post  
HT
 
Posts: n/a
Default

Sorry for the redundancy Greg..I usually don't pay attention to form
questions because I don't usually use them.

It seems too complicated..not a macro person.

Thanks again!

"Greg" wrote in message
oups.com...
Very similiar question asked and answered a few days ago:

You can't just select the name. You have to select the name then exit
the field with a macro set to run on exit from that field. Something
like:

Sub Fillin()
Dim oDoc As Document
Set oDoc = ActiveDocument
Select Case oDoc.FormFields("DropDown1").R*esult
Case Is = "Sheila"
oDoc.FormFields("Text1").Resul*t = "321-1234"
oDoc.FormFields("Text2").Resul*t = "
Case Is = "Greg"
oDoc.FormFields("Text1").Resul*t = "987-6754"
oDoc.FormFields("Text2").Resul*t = "
Case Else
oDoc.FormFields("Text1").Resul*t = "???-????"
oDoc.FormFields("Text2").Resul*t = "
End Select
End Sub


  #4   Report Post  
Charles Kenyon
 
Posts: n/a
Default

Instead of a macro, you could have a number of IF fields set to test the
results of your drop-down. The drop down must be set to calculate on exit,
and you do have to exit.
{ IF ddList1 = "Sam" "555-1212" }{ IF ddList1 = "Bill" "555-2121" } and so
forth. Each IF field tests the results of your drop down and upon the proper
result displays what you want.

Maintenance on this could be a real nightmare. Hope it helps.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

"HT" wrote in message
...
Microsoft Word 2003
WindowsXP

I am creating a form that has a drop-down menu. The drop-down menu has a
list of names. I want to be able to choose the drop-down menu name and
have
the fields that ask for the phone number and work hours to automatically
populate once you choose the person's name.

For instance: John Smith works 9:00-5:00 and his phone number is
(555)555-5555.

I want to be able to choose John Smith and have the phone number, works
hours immediately input in the fields.

If I ever get this part done I want to be able to click on a button and
have
all of the text copy to the clipboard and paste into the body of an
e-mail.

Thanks all!




  #5   Report Post  
HT
 
Posts: n/a
Default

Thanks Charles..what if I created a bookmark type of something (like my
jibberish)..typed it in one field and had that same field populate the other
fields. I am trying to simplify the procedure should someone else need to
pick up after it is completed..I'm afraid the macros may not carry over to
every user.


"Charles Kenyon" wrote in
message ...
Instead of a macro, you could have a number of IF fields set to test the
results of your drop-down. The drop down must be set to calculate on exit,
and you do have to exit.
{ IF ddList1 = "Sam" "555-1212" }{ IF ddList1 = "Bill" "555-2121" } and so
forth. Each IF field tests the results of your drop down and upon the

proper
result displays what you want.

Maintenance on this could be a real nightmare. Hope it helps.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

"HT" wrote in message
...
Microsoft Word 2003
WindowsXP

I am creating a form that has a drop-down menu. The drop-down menu has a
list of names. I want to be able to choose the drop-down menu name and
have
the fields that ask for the phone number and work hours to automatically
populate once you choose the person's name.

For instance: John Smith works 9:00-5:00 and his phone number is
(555)555-5555.

I want to be able to choose John Smith and have the phone number, works
hours immediately input in the fields.

If I ever get this part done I want to be able to click on a button and
have
all of the text copy to the clipboard and paste into the body of an
e-mail.

Thanks all!








  #6   Report Post  
Greg
 
Posts: n/a
Default

HT,

If you want Word to sing and dance,then you have to play the band ;-)

  #7   Report Post  
HT
 
Posts: n/a
Default

Haha..ok so I have to go the macro route??

I'm practicing now..I printed out all the e-mails, the tutorials on "What do
I do with macros sent to me by other newsgroup readers to help me out".

If you saw my desk right now....




"Greg" wrote in message
oups.com...
HT,

If you want Word to sing and dance,then you have to play the band ;-)



  #8   Report Post  
Charles Kenyon
 
Posts: n/a
Default

From the FAQ

19. How can I enter something once in a document and have it repeat
elsewhere?
http://gregmaxey.mvps.org/Repeating_Data.htm


Items in formfields are automatically bookmarked with the name of the field.
In my example, I assumed that the field name was ddList1.

Problems with inserted bookmarks instead of formfields include:

1) They are very fragile. It is difficult type in one without deleting the
bookmark.
2) After you update the bookmark contents, you have to update the REF field.
This is taken care of in a protected form if you mark the source field to
"calculate on exit."
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
"HT" wrote in message
...
Thanks Charles..what if I created a bookmark type of something (like my
jibberish)..typed it in one field and had that same field populate the
other
fields. I am trying to simplify the procedure should someone else need to
pick up after it is completed..I'm afraid the macros may not carry over to
every user.


"Charles Kenyon" wrote in
message ...
Instead of a macro, you could have a number of IF fields set to test the
results of your drop-down. The drop down must be set to calculate on
exit,
and you do have to exit.
{ IF ddList1 = "Sam" "555-1212" }{ IF ddList1 = "Bill" "555-2121" } and
so
forth. Each IF field tests the results of your drop down and upon the

proper
result displays what you want.

Maintenance on this could be a real nightmare. Hope it helps.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

"HT" wrote in message
...
Microsoft Word 2003
WindowsXP

I am creating a form that has a drop-down menu. The drop-down menu has
a
list of names. I want to be able to choose the drop-down menu name and
have
the fields that ask for the phone number and work hours to
automatically
populate once you choose the person's name.

For instance: John Smith works 9:00-5:00 and his phone number is
(555)555-5555.

I want to be able to choose John Smith and have the phone number, works
hours immediately input in the fields.

If I ever get this part done I want to be able to click on a button and
have
all of the text copy to the clipboard and paste into the body of an
e-mail.

Thanks all!








  #9   Report Post  
HT
 
Posts: n/a
Default

Charles,

Thank you..my attempt at macro-writing was horrible..I believe the Repeating
Data is the key that I need..will update the results.


"Charles Kenyon" wrote in
message ...
From the FAQ

19. How can I enter something once in a document and have it repeat
elsewhere?
http://gregmaxey.mvps.org/Repeating_Data.htm


Items in formfields are automatically bookmarked with the name of the

field.
In my example, I assumed that the field name was ddList1.

Problems with inserted bookmarks instead of formfields include:

1) They are very fragile. It is difficult type in one without deleting the
bookmark.
2) After you update the bookmark contents, you have to update the REF

field.
This is taken care of in a protected form if you mark the source field to
"calculate on exit."
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
"HT" wrote in message
...
Thanks Charles..what if I created a bookmark type of something (like my
jibberish)..typed it in one field and had that same field populate the
other
fields. I am trying to simplify the procedure should someone else need

to
pick up after it is completed..I'm afraid the macros may not carry over

to
every user.


"Charles Kenyon" wrote in
message ...
Instead of a macro, you could have a number of IF fields set to test

the
results of your drop-down. The drop down must be set to calculate on
exit,
and you do have to exit.
{ IF ddList1 = "Sam" "555-1212" }{ IF ddList1 = "Bill" "555-2121" } and
so
forth. Each IF field tests the results of your drop down and upon the

proper
result displays what you want.

Maintenance on this could be a real nightmare. Hope it helps.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

"HT" wrote in message
...
Microsoft Word 2003
WindowsXP

I am creating a form that has a drop-down menu. The drop-down menu

has
a
list of names. I want to be able to choose the drop-down menu name

and
have
the fields that ask for the phone number and work hours to
automatically
populate once you choose the person's name.

For instance: John Smith works 9:00-5:00 and his phone number is
(555)555-5555.

I want to be able to choose John Smith and have the phone number,

works
hours immediately input in the fields.

If I ever get this part done I want to be able to click on a button

and
have
all of the text copy to the clipboard and paste into the body of an
e-mail.

Thanks all!










Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a data update request form datagrl Microsoft Word Help 0 July 5th 05 05:31 PM
Tracking Form Drop Down list Scott Microsoft Word Help 1 May 16th 05 12:45 PM
Can I use a drop down in Word without having to lock the form? KelD Microsoft Word Help 2 May 9th 05 02:46 PM
Creating a form to have all fields populate same criteria HT New Users 3 April 26th 05 06:08 PM
Modifying Size of the Drop Down Form Field KSS Microsoft Word Help 1 February 24th 05 06:10 AM


All times are GMT +1. The time now is 11:54 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"