Home |
Search |
Today's Posts |
|
#1
|
|||
|
|||
Field Codes - If Field
Hi,
I have several forms and I want to fill in certain boxes depending on criteria I select from a dropdown list in a different box. I have looked at the IF Field messages posted and they all seem to mention MAILMERGE. The forms I am using are not MAILMERGE forms. For example, in an Excel Form you would choose the box you want the answer to be in and type =IF(B:3 = "Tea","two sugars"), If B:3 was populated with the statement "tea" the "answer" box would self-populate with the answer "two sugars" I wish to use the same type of formula in a Word Form but am unable to use the same formula in the Field codes box. Can this actually be done? If so, how?!?! Thank you |
#2
|
|||
|
|||
Lets say you have a formfield dropdown that you have bookmarked DD1 (to
keep it simple) The possible values are Tea, Coffee, Beer. When you set this field up check "Calculate on exit" Now postition your cursor where you want the self populating field. Don't put a formfield here instead use a ganged field construction like. Note all { } pairs are entered with CTRL+F9. {IF{DD1}="Tea""Two Sugars"}{IF{DD1}="Coffee""Black and bitter please"}{IF{DD1}="Beer""Why yes, I will have two, Thankyou"} |
#3
|
|||
|
|||
Greg,
fantastic, thank you. I knew I was close, but didn't realise how close. You have saved my sanity! One more on the same line if I may, once the code in the self populating field has been entered, how can I get back into it to change or expand it? Charlie -----Original Message----- Lets say you have a formfield dropdown that you have bookmarked DD1 (to keep it simple) The possible values are Tea, Coffee, Beer. When you set this field up check "Calculate on exit" Now postition your cursor where you want the self populating field. Don't put a formfield here instead use a ganged field construction like. Note all { } pairs are entered with CTRL+F9. {IF{DD1}="Tea""Two Sugars"}{IF{DD1}="Coffee""Black and bitter please"}{IF{DD1}="Beer""Why yes, I will have two, Thankyou"} . |
#4
|
|||
|
|||
Charlie,
To change the display, you change the selection in the dropdown field. To change what is displayed, then you would unprotect your document, right click the field and select "toggle field code" make your changes and retoggle the field an reprotect the document. -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. pompeyboyusa wrote: Greg, fantastic, thank you. I knew I was close, but didn't realise how close. You have saved my sanity! One more on the same line if I may, once the code in the self populating field has been entered, how can I get back into it to change or expand it? Charlie -----Original Message----- Lets say you have a formfield dropdown that you have bookmarked DD1 (to keep it simple) The possible values are Tea, Coffee, Beer. When you set this field up check "Calculate on exit" Now postition your cursor where you want the self populating field. Don't put a formfield here instead use a ganged field construction like. Note all { } pairs are entered with CTRL+F9. {IF{DD1}="Tea""Two Sugars"}{IF{DD1}="Coffee""Black and bitter please"}{IF{DD1}="Beer""Why yes, I will have two, Thankyou"} . |
#5
|
|||
|
|||
Greg,
Thank you very much, you have been most helpful and answered my questions perfectly regards Charlie "Greg Maxey" wrote: Charlie, To change the display, you change the selection in the dropdown field. To change what is displayed, then you would unprotect your document, right click the field and select "toggle field code" make your changes and retoggle the field an reprotect the document. -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. pompeyboyusa wrote: Greg, fantastic, thank you. I knew I was close, but didn't realise how close. You have saved my sanity! One more on the same line if I may, once the code in the self populating field has been entered, how can I get back into it to change or expand it? Charlie -----Original Message----- Lets say you have a formfield dropdown that you have bookmarked DD1 (to keep it simple) The possible values are Tea, Coffee, Beer. When you set this field up check "Calculate on exit" Now postition your cursor where you want the self populating field. Don't put a formfield here instead use a ganged field construction like. Note all { } pairs are entered with CTRL+F9. {IF{DD1}="Tea""Two Sugars"}{IF{DD1}="Coffee""Black and bitter please"}{IF{DD1}="Beer""Why yes, I will have two, Thankyou"} . |
#6
|
|||
|
|||
Field Codes - If Field
Macropod,
thanks but I am still a bit confused. The two bookmarks I have are 'rate' and 'mileage', and the result will be shown in a form field called 'total1'. Can you please point me in the right direction on where to put the bookmark names in the coding you very kindly wrote. Thanks you Charlie "pompeyboyUSA" wrote: Hi, I have several forms and I want to fill in certain boxes depending on criteria I select from a dropdown list in a different box. I have looked at the IF Field messages posted and they all seem to mention MAILMERGE. The forms I am using are not MAILMERGE forms. For example, in an Excel Form you would choose the box you want the answer to be in and type =IF(B:3 = "Tea","two sugars"), If B:3 was populated with the statement "tea" the "answer" box would self-populate with the answer "two sugars" I wish to use the same type of formula in a Word Form but am unable to use the same formula in the Field codes box. Can this actually be done? If so, how?!?! Thank you |
#7
|
|||
|
|||
Field Codes - If Field
Hi Charlie,
I'm not sure what it is you're trying to achieve. The outline you gave suggests a formula field (not a formfield) coded something along the lines of: {IF{Dropdown1}= "Tea" "Two Sugars"} But, since you mention 'rate' and 'mileage', which I assume are the bookmark names attached to formfields/dropdowns, I suspect you actually have some sort of formula in mind. If you simply want to multiply the mileage and rate bookmarks (regardless of how they're filled in), you can use a formula field (again, not a formfield) coded as: {={Mileage}*{Rate}} to which you might want to add a numeric picture switch: {={Mileage}*{Rate} \# $,0.00} to show a currency result. Cheers "pompeyboyUSA" wrote in message ... Macropod, thanks but I am still a bit confused. The two bookmarks I have are 'rate' and 'mileage', and the result will be shown in a form field called 'total1'. Can you please point me in the right direction on where to put the bookmark names in the coding you very kindly wrote. Thanks you Charlie "pompeyboyUSA" wrote: Hi, I have several forms and I want to fill in certain boxes depending on criteria I select from a dropdown list in a different box. I have looked at the IF Field messages posted and they all seem to mention MAILMERGE. The forms I am using are not MAILMERGE forms. For example, in an Excel Form you would choose the box you want the answer to be in and type =IF(B:3 = "Tea","two sugars"), If B:3 was populated with the statement "tea" the "answer" box would self-populate with the answer "two sugars" I wish to use the same type of formula in a Word Form but am unable to use the same formula in the Field codes box. Can this actually be done? If so, how?!?! Thank you |
#8
|
|||
|
|||
Field Codes - If Field
Macropod,
Thank you, it works perfectly well, I now understand what goes where and the calculations work. I do have one small question though and then I will leave you alone! Once I have the end columns to calculate the mileage x the rate (I then have a number of columns to add up at the bottom of the form) how do I do that? I know how to do this using bookmarks, but as I do not have the option to specify Bookmarks using Formula Fields (or do I!!), I can't get them to add up to a total. I am really grateful for your assistance so far Regards Charlie "macropod" wrote: Hi Charlie, I'm not sure what it is you're trying to achieve. The outline you gave suggests a formula field (not a formfield) coded something along the lines of: {IF{Dropdown1}= "Tea" "Two Sugars"} But, since you mention 'rate' and 'mileage', which I assume are the bookmark names attached to formfields/dropdowns, I suspect you actually have some sort of formula in mind. If you simply want to multiply the mileage and rate bookmarks (regardless of how they're filled in), you can use a formula field (again, not a formfield) coded as: {={Mileage}*{Rate}} to which you might want to add a numeric picture switch: {={Mileage}*{Rate} \# $,0.00} to show a currency result. Cheers "pompeyboyUSA" wrote in message ... Macropod, thanks but I am still a bit confused. The two bookmarks I have are 'rate' and 'mileage', and the result will be shown in a form field called 'total1'. Can you please point me in the right direction on where to put the bookmark names in the coding you very kindly wrote. Thanks you Charlie "pompeyboyUSA" wrote: Hi, I have several forms and I want to fill in certain boxes depending on criteria I select from a dropdown list in a different box. I have looked at the IF Field messages posted and they all seem to mention MAILMERGE. The forms I am using are not MAILMERGE forms. For example, in an Excel Form you would choose the box you want the answer to be in and type =IF(B:3 = "Tea","two sugars"), If B:3 was populated with the statement "tea" the "answer" box would self-populate with the answer "two sugars" I wish to use the same type of formula in a Word Form but am unable to use the same formula in the Field codes box. Can this actually be done? If so, how?!?! Thank you |
#9
|
|||
|
|||
Field Codes - If Field
Hi Charlie,
You certainly can use bookmarks in formula fields - check out my Word Field Maths 'tutorial' at: http://www.wopr.com/cgi-bin/w3t/show...?Number=365442 and my Word Date calculations 'tutorial' at: http://www.wopr.com/cgi-bin/w3t/show...?Number=249902 Cheers "pompeyboyUSA" wrote in message ... Macropod, Thank you, it works perfectly well, I now understand what goes where and the calculations work. I do have one small question though and then I will leave you alone! Once I have the end columns to calculate the mileage x the rate (I then have a number of columns to add up at the bottom of the form) how do I do that? I know how to do this using bookmarks, but as I do not have the option to specify Bookmarks using Formula Fields (or do I!!), I can't get them to add up to a total. I am really grateful for your assistance so far Regards Charlie "macropod" wrote: Hi Charlie, I'm not sure what it is you're trying to achieve. The outline you gave suggests a formula field (not a formfield) coded something along the lines of: {IF{Dropdown1}= "Tea" "Two Sugars"} But, since you mention 'rate' and 'mileage', which I assume are the bookmark names attached to formfields/dropdowns, I suspect you actually have some sort of formula in mind. If you simply want to multiply the mileage and rate bookmarks (regardless of how they're filled in), you can use a formula field (again, not a formfield) coded as: {={Mileage}*{Rate}} to which you might want to add a numeric picture switch: {={Mileage}*{Rate} \# $,0.00} to show a currency result. Cheers "pompeyboyUSA" wrote in message ... Macropod, thanks but I am still a bit confused. The two bookmarks I have are 'rate' and 'mileage', and the result will be shown in a form field called 'total1'. Can you please point me in the right direction on where to put the bookmark names in the coding you very kindly wrote. Thanks you Charlie "pompeyboyUSA" wrote: Hi, I have several forms and I want to fill in certain boxes depending on criteria I select from a dropdown list in a different box. I have looked at the IF Field messages posted and they all seem to mention MAILMERGE. The forms I am using are not MAILMERGE forms. For example, in an Excel Form you would choose the box you want the answer to be in and type =IF(B:3 = "Tea","two sugars"), If B:3 was populated with the statement "tea" the "answer" box would self-populate with the answer "two sugars" I wish to use the same type of formula in a Word Form but am unable to use the same formula in the Field codes box. Can this actually be done? If so, how?!?! Thank you |
#10
|
|||
|
|||
Field Codes - If Field
Macropod,
Thank you, that is good news, I will check this out and get back to you. Thank you for your help so far Charlie "macropod" wrote: Hi Charlie, You certainly can use bookmarks in formula fields - check out my Word Field Maths 'tutorial' at: http://www.wopr.com/cgi-bin/w3t/show...?Number=365442 and my Word Date calculations 'tutorial' at: http://www.wopr.com/cgi-bin/w3t/show...?Number=249902 Cheers "pompeyboyUSA" wrote in message ... Macropod, Thank you, it works perfectly well, I now understand what goes where and the calculations work. I do have one small question though and then I will leave you alone! Once I have the end columns to calculate the mileage x the rate (I then have a number of columns to add up at the bottom of the form) how do I do that? I know how to do this using bookmarks, but as I do not have the option to specify Bookmarks using Formula Fields (or do I!!), I can't get them to add up to a total. I am really grateful for your assistance so far Regards Charlie "macropod" wrote: Hi Charlie, I'm not sure what it is you're trying to achieve. The outline you gave suggests a formula field (not a formfield) coded something along the lines of: {IF{Dropdown1}= "Tea" "Two Sugars"} But, since you mention 'rate' and 'mileage', which I assume are the bookmark names attached to formfields/dropdowns, I suspect you actually have some sort of formula in mind. If you simply want to multiply the mileage and rate bookmarks (regardless of how they're filled in), you can use a formula field (again, not a formfield) coded as: {={Mileage}*{Rate}} to which you might want to add a numeric picture switch: {={Mileage}*{Rate} \# $,0.00} to show a currency result. Cheers "pompeyboyUSA" wrote in message ... Macropod, thanks but I am still a bit confused. The two bookmarks I have are 'rate' and 'mileage', and the result will be shown in a form field called 'total1'. Can you please point me in the right direction on where to put the bookmark names in the coding you very kindly wrote. Thanks you Charlie "pompeyboyUSA" wrote: Hi, I have several forms and I want to fill in certain boxes depending on criteria I select from a dropdown list in a different box. I have looked at the IF Field messages posted and they all seem to mention MAILMERGE. The forms I am using are not MAILMERGE forms. For example, in an Excel Form you would choose the box you want the answer to be in and type =IF(B:3 = "Tea","two sugars"), If B:3 was populated with the statement "tea" the "answer" box would self-populate with the answer "two sugars" I wish to use the same type of formula in a Word Form but am unable to use the same formula in the Field codes box. Can this actually be done? If so, how?!?! Thank you |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I set default on Toggle Field Codes? | Microsoft Word Help | |||
How do I turn off field codes in an MS Word document? | Microsoft Word Help | |||
Cannot view field codes | Microsoft Word Help | |||
Field Codes | Microsoft Word Help | |||
Word Field Codes in Excel data file | Mailmerge |