Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Calculations in text form fields
I did a search of the forum on this topic and didnt find anything that
answered my question. Im using Word 2007 but this also needs to work with 2003. I am revamping a form that uses text form fields. Several of the fields are drop-downs where you can choose a number (1, 2, 3, or 4). Another field is supposed to sum the numbers from all the drop-downs. I cannot get this operation to work. No matter how I configure the text fields, the summation field just says zero. Heres how Ive configured things. First, the drop-downs (assume three) are just created normally (default settings). Second, the summation field is configured as follows (in the Text Form Field Options dialog box): Type: Calculation Expression: =Dropdown_bookmark1+Dropdown_bookmark2+Dropdown_bo okmark3 Maximum length: Unlimited (default value) All other fields blank. €śCalculate on exit€ť is selected. A colleague did some hacking and got the summation to work by making the following changes in the Text Form Field Options dialog box: Change the drop-downs to regular text form fields and set the Type to Number. In the summation field, enclose the Expression in parentheses, as in: =(Textfield_bookmark1+Textfield _bookmark2+Textfield _bookmark3) In the summation field, clear the text in the Bookmark field. I could go this route, but I would prefer to keep the drop-downs if possible. Does anyone have any advice? Thanks. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Calculations in text form fields
Hi kmewing,
First off, make sure you're using the 'legacy' dropdown formfields. Next, with each dropdown formfield, make sure its properties include a bookmark name (eg DropDown1, DropDown2, DropDown3, DropDown4,) and that it is set to 'calculate on exit'. Then, where you want the calculation to go, press Ctrl-F9 to create a formula field coded as: {=DropDown1+DropDown2+DropDown3+DropDown4} You can also add formatting switches to the formula field - eg: {=DropDown1+DropDown2+DropDown3+DropDown4 \# 0;(0)} for whole numbers, with brackets around negative values {=DropDown1+DropDown2+DropDown3+DropDown4 \# $,0.00} for currency with a thousands separator -- Cheers macropod [MVP - Microsoft Word] "kmewing" wrote in message ... I did a search of the forum on this topic and didnt find anything that answered my question. Im using Word 2007 but this also needs to work with 2003. I am revamping a form that uses text form fields. Several of the fields are drop-downs where you can choose a number (1, 2, 3, or 4). Another field is supposed to sum the numbers from all the drop-downs. I cannot get this operation to work. No matter how I configure the text fields, the summation field just says zero. Heres how Ive configured things. First, the drop-downs (assume three) are just created normally (default settings). Second, the summation field is configured as follows (in the Text Form Field Options dialog box): Type: Calculation Expression: =Dropdown_bookmark1+Dropdown_bookmark2+Dropdown_bo okmark3 Maximum length: Unlimited (default value) All other fields blank. €śCalculate on exit€ť is selected. A colleague did some hacking and got the summation to work by making the following changes in the Text Form Field Options dialog box: Change the drop-downs to regular text form fields and set the Type to Number. In the summation field, enclose the Expression in parentheses, as in: =(Textfield_bookmark1+Textfield _bookmark2+Textfield _bookmark3) In the summation field, clear the text in the Bookmark field. I could go this route, but I would prefer to keep the drop-downs if possible. Does anyone have any advice? Thanks. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Calculations in text form fields
Thanks for the suggestions. I set up the file exactly as you described but I
still get the same behavior. The result field just shows zero regardless of what values are entered into the drop-downs. "macropod" wrote: Hi kmewing, First off, make sure you're using the 'legacy' dropdown formfields. Next, with each dropdown formfield, make sure its properties include a bookmark name (eg DropDown1, DropDown2, DropDown3, DropDown4,) and that it is set to 'calculate on exit'. Then, where you want the calculation to go, press Ctrl-F9 to create a formula field coded as: {=DropDown1+DropDown2+DropDown3+DropDown4} You can also add formatting switches to the formula field - eg: {=DropDown1+DropDown2+DropDown3+DropDown4 \# 0;(0)} for whole numbers, with brackets around negative values {=DropDown1+DropDown2+DropDown3+DropDown4 \# $,0.00} for currency with a thousands separator -- Cheers macropod [MVP - Microsoft Word] "kmewing" wrote in message ... I did a search of the forum on this topic and didnt find anything that answered my question. Im using Word 2007 but this also needs to work with 2003. I am revamping a form that uses text form fields. Several of the fields are drop-downs where you can choose a number (1, 2, 3, or 4). Another field is supposed to sum the numbers from all the drop-downs. I cannot get this operation to work. No matter how I configure the text fields, the summation field just says zero. Heres how Ive configured things. First, the drop-downs (assume three) are just created normally (default settings). Second, the summation field is configured as follows (in the Text Form Field Options dialog box): Type: Calculation Expression: =Dropdown_bookmark1+Dropdown_bookmark2+Dropdown_bo okmark3 Maximum length: Unlimited (default value) All other fields blank. €śCalculate on exit€ť is selected. A colleague did some hacking and got the summation to work by making the following changes in the Text Form Field Options dialog box: Change the drop-downs to regular text form fields and set the Type to Number. In the summation field, enclose the Expression in parentheses, as in: =(Textfield_bookmark1+Textfield _bookmark2+Textfield _bookmark3) In the summation field, clear the text in the Bookmark field. I could go this route, but I would prefer to keep the drop-downs if possible. Does anyone have any advice? Thanks. |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Calculations in text form fields
Hi kmewing,
Have you protected the document for forms? If so, and you've follwed the previous directions exactly, it should work. The only other thing I can think of that would prevent it working is if you've got mergefields (for a mailmerge) embedded in the same document. -- Cheers macropod [MVP - Microsoft Word] "kmewing" wrote in message ... Thanks for the suggestions. I set up the file exactly as you described but I still get the same behavior. The result field just shows zero regardless of what values are entered into the drop-downs. "macropod" wrote: Hi kmewing, First off, make sure you're using the 'legacy' dropdown formfields. Next, with each dropdown formfield, make sure its properties include a bookmark name (eg DropDown1, DropDown2, DropDown3, DropDown4,) and that it is set to 'calculate on exit'. Then, where you want the calculation to go, press Ctrl-F9 to create a formula field coded as: {=DropDown1+DropDown2+DropDown3+DropDown4} You can also add formatting switches to the formula field - eg: {=DropDown1+DropDown2+DropDown3+DropDown4 \# 0;(0)} for whole numbers, with brackets around negative values {=DropDown1+DropDown2+DropDown3+DropDown4 \# $,0.00} for currency with a thousands separator -- Cheers macropod [MVP - Microsoft Word] "kmewing" wrote in message ... I did a search of the forum on this topic and didnt find anything that answered my question. Im using Word 2007 but this also needs to work with 2003. I am revamping a form that uses text form fields. Several of the fields are drop-downs where you can choose a number (1, 2, 3, or 4). Another field is supposed to sum the numbers from all the drop-downs. I cannot get this operation to work. No matter how I configure the text fields, the summation field just says zero. Heres how Ive configured things. First, the drop-downs (assume three) are just created normally (default settings). Second, the summation field is configured as follows (in the Text Form Field Options dialog box): Type: Calculation Expression: =Dropdown_bookmark1+Dropdown_bookmark2+Dropdown_bo okmark3 Maximum length: Unlimited (default value) All other fields blank. €śCalculate on exit€ť is selected. A colleague did some hacking and got the summation to work by making the following changes in the Text Form Field Options dialog box: Change the drop-downs to regular text form fields and set the Type to Number. In the summation field, enclose the Expression in parentheses, as in: =(Textfield_bookmark1+Textfield _bookmark2+Textfield _bookmark3) In the summation field, clear the text in the Bookmark field. I could go this route, but I would prefer to keep the drop-downs if possible. Does anyone have any advice? Thanks. |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Calculations in text form fields
Yes, I enabled protection. In fact, I created a test document just to test
this functionality. I opened a pristine new document, and the only text I inserted is the text form fields, so there is no other text or functionality embedded in this document to interfere. There must be a reason why this isn't working but I just don't see it. At the very least, this discussion has shown that the problem is not due to some glaring, obvious omission. Thanks for your time nonetheless. Ken "macropod" wrote: Hi kmewing, Have you protected the document for forms? If so, and you've follwed the previous directions exactly, it should work. The only other thing I can think of that would prevent it working is if you've got mergefields (for a mailmerge) embedded in the same document. -- Cheers macropod [MVP - Microsoft Word] "kmewing" wrote in message ... Thanks for the suggestions. I set up the file exactly as you described but I still get the same behavior. The result field just shows zero regardless of what values are entered into the drop-downs. "macropod" wrote: Hi kmewing, First off, make sure you're using the 'legacy' dropdown formfields. Next, with each dropdown formfield, make sure its properties include a bookmark name (eg DropDown1, DropDown2, DropDown3, DropDown4,) and that it is set to 'calculate on exit'. Then, where you want the calculation to go, press Ctrl-F9 to create a formula field coded as: {=DropDown1+DropDown2+DropDown3+DropDown4} You can also add formatting switches to the formula field - eg: {=DropDown1+DropDown2+DropDown3+DropDown4 \# 0;(0)} for whole numbers, with brackets around negative values {=DropDown1+DropDown2+DropDown3+DropDown4 \# $,0.00} for currency with a thousands separator -- Cheers macropod [MVP - Microsoft Word] "kmewing" wrote in message ... I did a search of the forum on this topic and didnt find anything that answered my question. Im using Word 2007 but this also needs to work with 2003. I am revamping a form that uses text form fields. Several of the fields are drop-downs where you can choose a number (1, 2, 3, or 4). Another field is supposed to sum the numbers from all the drop-downs. I cannot get this operation to work. No matter how I configure the text fields, the summation field just says zero. Heres how Ive configured things. First, the drop-downs (assume three) are just created normally (default settings). Second, the summation field is configured as follows (in the Text Form Field Options dialog box): Type: Calculation Expression: =Dropdown_bookmark1+Dropdown_bookmark2+Dropdown_bo okmark3 Maximum length: Unlimited (default value) All other fields blank. €śCalculate on exit€ť is selected. A colleague did some hacking and got the summation to work by making the following changes in the Text Form Field Options dialog box: Change the drop-downs to regular text form fields and set the Type to Number. In the summation field, enclose the Expression in parentheses, as in: =(Textfield_bookmark1+Textfield _bookmark2+Textfield _bookmark3) In the summation field, clear the text in the Bookmark field. I could go this route, but I would prefer to keep the drop-downs if possible. Does anyone have any advice? Thanks. |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Calculations in text form fields
You cannot do calculations directly with DropDown formfields, but must use a
macro that runs on exit. Dim dd1 As Long, dd2 As Long With ActiveDocument dd1 = .FormFields("Dropdown1").DropDown.Value dd2 = .FormFields("Dropdown2").DropDown.Value .FormFields("Text1").result = Val(.FormFields("Dropdown1").DropDown.ListEntries( dd1).Name) + _ Val(.FormFields("Dropdown1").DropDown.ListEntries( dd2).Name) End With Make sure that your formfield that is to show the result is NOT set to a Calculation type formfield. It must be of type "Regular Text" -- 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 "kmewing" wrote in message ... Yes, I enabled protection. In fact, I created a test document just to test this functionality. I opened a pristine new document, and the only text I inserted is the text form fields, so there is no other text or functionality embedded in this document to interfere. There must be a reason why this isn't working but I just don't see it. At the very least, this discussion has shown that the problem is not due to some glaring, obvious omission. Thanks for your time nonetheless. Ken "macropod" wrote: Hi kmewing, Have you protected the document for forms? If so, and you've follwed the previous directions exactly, it should work. The only other thing I can think of that would prevent it working is if you've got mergefields (for a mailmerge) embedded in the same document. -- Cheers macropod [MVP - Microsoft Word] "kmewing" wrote in message ... Thanks for the suggestions. I set up the file exactly as you described but I still get the same behavior. The result field just shows zero regardless of what values are entered into the drop-downs. "macropod" wrote: Hi kmewing, First off, make sure you're using the 'legacy' dropdown formfields. Next, with each dropdown formfield, make sure its properties include a bookmark name (eg DropDown1, DropDown2, DropDown3, DropDown4,) and that it is set to 'calculate on exit'. Then, where you want the calculation to go, press Ctrl-F9 to create a formula field coded as: {=DropDown1+DropDown2+DropDown3+DropDown4} You can also add formatting switches to the formula field - eg: {=DropDown1+DropDown2+DropDown3+DropDown4 \# 0;(0)} for whole numbers, with brackets around negative values {=DropDown1+DropDown2+DropDown3+DropDown4 \# $,0.00} for currency with a thousands separator -- Cheers macropod [MVP - Microsoft Word] "kmewing" wrote in message ... I did a search of the forum on this topic and didn't find anything that answered my question. I'm using Word 2007 but this also needs to work with 2003. I am revamping a form that uses text form fields. Several of the fields are drop-downs where you can choose a number (1, 2, 3, or 4). Another field is supposed to sum the numbers from all the drop-downs. I cannot get this operation to work. No matter how I configure the text fields, the summation field just says zero. Here's how I've configured things. First, the drop-downs (assume three) are just created normally (default settings). Second, the summation field is configured as follows (in the Text Form Field Options dialog box): Type: Calculation Expression: =Dropdown_bookmark1+Dropdown_bookmark2+Dropdown_bo okmark3 Maximum length: Unlimited (default value) All other fields blank. "Calculate on exit" is selected. A colleague did some hacking and got the summation to work by making the following changes in the Text Form Field Options dialog box: Change the drop-downs to regular text form fields and set the Type to Number. In the summation field, enclose the Expression in parentheses, as in: =(Textfield_bookmark1+Textfield _bookmark2+Textfield _bookmark3) In the summation field, clear the text in the Bookmark field. I could go this route, but I would prefer to keep the drop-downs if possible. Does anyone have any advice? Thanks. |
#7
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Calculations in text form fields
You cannot do calculations directly with DropDown formfields
Oops! -- Cheers macropod [MVP - Microsoft Word] "Doug Robbins - Word MVP" wrote in message ... You cannot do calculations directly with DropDown formfields, but must use a macro that runs on exit. Dim dd1 As Long, dd2 As Long With ActiveDocument dd1 = .FormFields("Dropdown1").DropDown.Value dd2 = .FormFields("Dropdown2").DropDown.Value .FormFields("Text1").result = Val(.FormFields("Dropdown1").DropDown.ListEntries( dd1).Name) + _ Val(.FormFields("Dropdown1").DropDown.ListEntries( dd2).Name) End With Make sure that your formfield that is to show the result is NOT set to a Calculation type formfield. It must be of type "Regular Text" -- 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 "kmewing" wrote in message ... Yes, I enabled protection. In fact, I created a test document just to test this functionality. I opened a pristine new document, and the only text I inserted is the text form fields, so there is no other text or functionality embedded in this document to interfere. There must be a reason why this isn't working but I just don't see it. At the very least, this discussion has shown that the problem is not due to some glaring, obvious omission. Thanks for your time nonetheless. Ken "macropod" wrote: Hi kmewing, Have you protected the document for forms? If so, and you've follwed the previous directions exactly, it should work. The only other thing I can think of that would prevent it working is if you've got mergefields (for a mailmerge) embedded in the same document. -- Cheers macropod [MVP - Microsoft Word] "kmewing" wrote in message ... Thanks for the suggestions. I set up the file exactly as you described but I still get the same behavior. The result field just shows zero regardless of what values are entered into the drop-downs. "macropod" wrote: Hi kmewing, First off, make sure you're using the 'legacy' dropdown formfields. Next, with each dropdown formfield, make sure its properties include a bookmark name (eg DropDown1, DropDown2, DropDown3, DropDown4,) and that it is set to 'calculate on exit'. Then, where you want the calculation to go, press Ctrl-F9 to create a formula field coded as: {=DropDown1+DropDown2+DropDown3+DropDown4} You can also add formatting switches to the formula field - eg: {=DropDown1+DropDown2+DropDown3+DropDown4 \# 0;(0)} for whole numbers, with brackets around negative values {=DropDown1+DropDown2+DropDown3+DropDown4 \# $,0.00} for currency with a thousands separator -- Cheers macropod [MVP - Microsoft Word] "kmewing" wrote in message ... I did a search of the forum on this topic and didn't find anything that answered my question. I'm using Word 2007 but this also needs to work with 2003. I am revamping a form that uses text form fields. Several of the fields are drop-downs where you can choose a number (1, 2, 3, or 4). Another field is supposed to sum the numbers from all the drop-downs. I cannot get this operation to work. No matter how I configure the text fields, the summation field just says zero. Here's how I've configured things. First, the drop-downs (assume three) are just created normally (default settings). Second, the summation field is configured as follows (in the Text Form Field Options dialog box): Type: Calculation Expression: =Dropdown_bookmark1+Dropdown_bookmark2+Dropdown_bo okmark3 Maximum length: Unlimited (default value) All other fields blank. "Calculate on exit" is selected. A colleague did some hacking and got the summation to work by making the following changes in the Text Form Field Options dialog box: Change the drop-downs to regular text form fields and set the Type to Number. In the summation field, enclose the Expression in parentheses, as in: =(Textfield_bookmark1+Textfield _bookmark2+Textfield _bookmark3) In the summation field, clear the text in the Bookmark field. I could go this route, but I would prefer to keep the drop-downs if possible. Does anyone have any advice? Thanks. |
#8
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Calculations in text form fields
Actually, you CAN do calculations directly with DropDown formfields - I merely had the syntax wrong. It should have been:
{={REF DropDown1}+{REF DropDown2}+{REF DropDown3}+{REF DropDown4}} where the field braces (ie '{ }') are created in pairs via Ctrl-F9. -- Cheers macropod [MVP - Microsoft Word] "Doug Robbins - Word MVP" wrote in message ... You cannot do calculations directly with DropDown formfields, but must use a macro that runs on exit. Dim dd1 As Long, dd2 As Long With ActiveDocument dd1 = .FormFields("Dropdown1").DropDown.Value dd2 = .FormFields("Dropdown2").DropDown.Value .FormFields("Text1").result = Val(.FormFields("Dropdown1").DropDown.ListEntries( dd1).Name) + _ Val(.FormFields("Dropdown1").DropDown.ListEntries( dd2).Name) End With Make sure that your formfield that is to show the result is NOT set to a Calculation type formfield. It must be of type "Regular Text" -- 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 "kmewing" wrote in message ... Yes, I enabled protection. In fact, I created a test document just to test this functionality. I opened a pristine new document, and the only text I inserted is the text form fields, so there is no other text or functionality embedded in this document to interfere. There must be a reason why this isn't working but I just don't see it. At the very least, this discussion has shown that the problem is not due to some glaring, obvious omission. Thanks for your time nonetheless. Ken "macropod" wrote: Hi kmewing, Have you protected the document for forms? If so, and you've follwed the previous directions exactly, it should work. The only other thing I can think of that would prevent it working is if you've got mergefields (for a mailmerge) embedded in the same document. -- Cheers macropod [MVP - Microsoft Word] "kmewing" wrote in message ... Thanks for the suggestions. I set up the file exactly as you described but I still get the same behavior. The result field just shows zero regardless of what values are entered into the drop-downs. "macropod" wrote: Hi kmewing, First off, make sure you're using the 'legacy' dropdown formfields. Next, with each dropdown formfield, make sure its properties include a bookmark name (eg DropDown1, DropDown2, DropDown3, DropDown4,) and that it is set to 'calculate on exit'. Then, where you want the calculation to go, press Ctrl-F9 to create a formula field coded as: {=DropDown1+DropDown2+DropDown3+DropDown4} You can also add formatting switches to the formula field - eg: {=DropDown1+DropDown2+DropDown3+DropDown4 \# 0;(0)} for whole numbers, with brackets around negative values {=DropDown1+DropDown2+DropDown3+DropDown4 \# $,0.00} for currency with a thousands separator -- Cheers macropod [MVP - Microsoft Word] "kmewing" wrote in message ... I did a search of the forum on this topic and didn't find anything that answered my question. I'm using Word 2007 but this also needs to work with 2003. I am revamping a form that uses text form fields. Several of the fields are drop-downs where you can choose a number (1, 2, 3, or 4). Another field is supposed to sum the numbers from all the drop-downs. I cannot get this operation to work. No matter how I configure the text fields, the summation field just says zero. Here's how I've configured things. First, the drop-downs (assume three) are just created normally (default settings). Second, the summation field is configured as follows (in the Text Form Field Options dialog box): Type: Calculation Expression: =Dropdown_bookmark1+Dropdown_bookmark2+Dropdown_bo okmark3 Maximum length: Unlimited (default value) All other fields blank. "Calculate on exit" is selected. A colleague did some hacking and got the summation to work by making the following changes in the Text Form Field Options dialog box: Change the drop-downs to regular text form fields and set the Type to Number. In the summation field, enclose the Expression in parentheses, as in: =(Textfield_bookmark1+Textfield _bookmark2+Textfield _bookmark3) In the summation field, clear the text in the Bookmark field. I could go this route, but I would prefer to keep the drop-downs if possible. Does anyone have any advice? Thanks. |
#9
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Calculations in text form fields
Ah, but is that directly?
It's really splitting hairs, but you are using a reference to the dropdowns. Still, it is less work than a macro -- 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 "macropod" wrote in message ... Actually, you CAN do calculations directly with DropDown formfields - I merely had the syntax wrong. It should have been: {={REF DropDown1}+{REF DropDown2}+{REF DropDown3}+{REF DropDown4}} where the field braces (ie '{ }') are created in pairs via Ctrl-F9. -- Cheers macropod [MVP - Microsoft Word] "Doug Robbins - Word MVP" wrote in message ... You cannot do calculations directly with DropDown formfields, but must use a macro that runs on exit. Dim dd1 As Long, dd2 As Long With ActiveDocument dd1 = .FormFields("Dropdown1").DropDown.Value dd2 = .FormFields("Dropdown2").DropDown.Value .FormFields("Text1").result = Val(.FormFields("Dropdown1").DropDown.ListEntries( dd1).Name) + _ Val(.FormFields("Dropdown1").DropDown.ListEntries( dd2).Name) End With Make sure that your formfield that is to show the result is NOT set to a Calculation type formfield. It must be of type "Regular Text" -- 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 "kmewing" wrote in message ... Yes, I enabled protection. In fact, I created a test document just to test this functionality. I opened a pristine new document, and the only text I inserted is the text form fields, so there is no other text or functionality embedded in this document to interfere. There must be a reason why this isn't working but I just don't see it. At the very least, this discussion has shown that the problem is not due to some glaring, obvious omission. Thanks for your time nonetheless. Ken "macropod" wrote: Hi kmewing, Have you protected the document for forms? If so, and you've follwed the previous directions exactly, it should work. The only other thing I can think of that would prevent it working is if you've got mergefields (for a mailmerge) embedded in the same document. -- Cheers macropod [MVP - Microsoft Word] "kmewing" wrote in message ... Thanks for the suggestions. I set up the file exactly as you described but I still get the same behavior. The result field just shows zero regardless of what values are entered into the drop-downs. "macropod" wrote: Hi kmewing, First off, make sure you're using the 'legacy' dropdown formfields. Next, with each dropdown formfield, make sure its properties include a bookmark name (eg DropDown1, DropDown2, DropDown3, DropDown4,) and that it is set to 'calculate on exit'. Then, where you want the calculation to go, press Ctrl-F9 to create a formula field coded as: {=DropDown1+DropDown2+DropDown3+DropDown4} You can also add formatting switches to the formula field - eg: {=DropDown1+DropDown2+DropDown3+DropDown4 \# 0;(0)} for whole numbers, with brackets around negative values {=DropDown1+DropDown2+DropDown3+DropDown4 \# $,0.00} for currency with a thousands separator -- Cheers macropod [MVP - Microsoft Word] "kmewing" wrote in message ... I did a search of the forum on this topic and didn't find anything that answered my question. I'm using Word 2007 but this also needs to work with 2003. I am revamping a form that uses text form fields. Several of the fields are drop-downs where you can choose a number (1, 2, 3, or 4). Another field is supposed to sum the numbers from all the drop-downs. I cannot get this operation to work. No matter how I configure the text fields, the summation field just says zero. Here's how I've configured things. First, the drop-downs (assume three) are just created normally (default settings). Second, the summation field is configured as follows (in the Text Form Field Options dialog box): Type: Calculation Expression: =Dropdown_bookmark1+Dropdown_bookmark2+Dropdown_bo okmark3 Maximum length: Unlimited (default value) All other fields blank. "Calculate on exit" is selected. A colleague did some hacking and got the summation to work by making the following changes in the Text Form Field Options dialog box: Change the drop-downs to regular text form fields and set the Type to Number. In the summation field, enclose the Expression in parentheses, as in: =(Textfield_bookmark1+Textfield _bookmark2+Textfield _bookmark3) In the summation field, clear the text in the Bookmark field. I could go this route, but I would prefer to keep the drop-downs if possible. Does anyone have any advice? Thanks. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calculations in Form Fields not working | Microsoft Word Help | |||
Text Form Calculations | Microsoft Word Help | |||
Help! Form fields in table and calculations! | Microsoft Word Help | |||
Calculations in form fields | Microsoft Word Help | |||
How do I make a form in Word with fields that do calculations? | Microsoft Word Help |