Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
HT,
If you want Word to sing and dance,then you have to play the band ;-) |
#7
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating a data update request form | Microsoft Word Help | |||
Tracking Form Drop Down list | Microsoft Word Help | |||
Can I use a drop down in Word without having to lock the form? | Microsoft Word Help | |||
Creating a form to have all fields populate same criteria | New Users | |||
Modifying Size of the Drop Down Form Field | Microsoft Word Help |