Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Text Form Field question
I'm using Word 2003. I have a text form field named Text1, regular text,
length limited to three characters, fill in enabled, calculate on exit enabled. The form is protected. With the following in Ctrl-F9 braces: { IF { Text1 } = €ś45C€ť €śLake County€ť }{ IF { Text1 } = €ś45D€ť €śLake District€ť }{ IF { Text1 } = €ś49C€ť €śMarion County€ť } If I type 45 and anything after it (e.g. 45A or 45B or 45C or 45D or 45E, etc.) I get the response of €śLake CountyLake District€ť. If I type 49 and anything after it (e.g. 45A or 45B or 45C or 45D or 45E, etc.) I get the response of €śMarion County€ť. How do I make it check for the correct third character? |
#2
|
|||
|
|||
Text Form Field question
Hi Ray-
It appears there is a problem with your syntax/phrasing for a nested IF. Perhaps this example will put you on the right track: In this example, special rates are offered only to residents of California or Washington. If the State field specifies any other state, no additional text is printed because no alternative text has been specified in the second IF field. {IF {MERGEFIELD State} = "CA" "For California residents, we offer special rates to Asia and Japan." "{IF {MERGEFIELD State} = "WA" "For Washington residents, we offer special rates to Asia and Japan." " "} "} HTH |:) "Ray_Johnson" wrote: I'm using Word 2003. I have a text form field named Text1, regular text, length limited to three characters, fill in enabled, calculate on exit enabled. The form is protected. With the following in Ctrl-F9 braces: { IF { Text1 } = €ś45C€ť €śLake County€ť }{ IF { Text1 } = €ś45D€ť €śLake District€ť }{ IF { Text1 } = €ś49C€ť €śMarion County€ť } If I type 45 and anything after it (e.g. 45A or 45B or 45C or 45D or 45E, etc.) I get the response of €śLake CountyLake District€ť. If I type 49 and anything after it (e.g. 45A or 45B or 45C or 45D or 45E, etc.) I get the response of €śMarion County€ť. How do I make it check for the correct third character? |
#3
|
|||
|
|||
Text Form Field question
These are not mergefields but REF fields and it is not essential to put an
alternative in a conditional field. If there is no alternative nothing is entered when the condition is not met. What was originally posted should work, but doesn't. Unfortunately I don't see a simple solution while letters and numbers are used in the field result. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org CyberTaz wrote: Hi Ray- It appears there is a problem with your syntax/phrasing for a nested IF. Perhaps this example will put you on the right track: In this example, special rates are offered only to residents of California or Washington. If the State field specifies any other state, no additional text is printed because no alternative text has been specified in the second IF field. {IF {MERGEFIELD State} = "CA" "For California residents, we offer special rates to Asia and Japan." "{IF {MERGEFIELD State} = "WA" "For Washington residents, we offer special rates to Asia and Japan." " "} "} HTH |:) "Ray_Johnson" wrote: I'm using Word 2003. I have a text form field named Text1, regular text, length limited to three characters, fill in enabled, calculate on exit enabled. The form is protected. With the following in Ctrl-F9 braces: { IF { Text1 } = "45C" "Lake County" }{ IF { Text1 } = "45D" "Lake District" }{ IF { Text1 } = "49C" "Marion County" } If I type 45 and anything after it (e.g. 45A or 45B or 45C or 45D or 45E, etc.) I get the response of "Lake CountyLake District". If I type 49 and anything after it (e.g. 45A or 45B or 45C or 45D or 45E, etc.) I get the response of "Marion County". How do I make it check for the correct third character? |
#4
|
|||
|
|||
Text Form Field question
This has all the hallmarks of a "feature". You can get round it by creating
a temporary variable/bookmark with a leading non-numric character ... { Set Temp1 "A{ Text1 }" }{ IF { Temp1 } = "A45C" "Lake County" }{ IF { Temp1 } = "A45D" "Lake District" }{ IF { Temp1 } = "A49C" "Marion County" } (all braces via Ctrl+F9 of course) -- Enjoy, Tony "Graham Mayor" wrote in message ... These are not mergefields but REF fields and it is not essential to put an alternative in a conditional field. If there is no alternative nothing is entered when the condition is not met. What was originally posted should work, but doesn't. Unfortunately I don't see a simple solution while letters and numbers are used in the field result. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org CyberTaz wrote: Hi Ray- It appears there is a problem with your syntax/phrasing for a nested IF. Perhaps this example will put you on the right track: In this example, special rates are offered only to residents of California or Washington. If the State field specifies any other state, no additional text is printed because no alternative text has been specified in the second IF field. {IF {MERGEFIELD State} = "CA" "For California residents, we offer special rates to Asia and Japan." "{IF {MERGEFIELD State} = "WA" "For Washington residents, we offer special rates to Asia and Japan." " "} "} HTH |:) "Ray_Johnson" wrote: I'm using Word 2003. I have a text form field named Text1, regular text, length limited to three characters, fill in enabled, calculate on exit enabled. The form is protected. With the following in Ctrl-F9 braces: { IF { Text1 } = "45C" "Lake County" }{ IF { Text1 } = "45D" "Lake District" }{ IF { Text1 } = "49C" "Marion County" } If I type 45 and anything after it (e.g. 45A or 45B or 45C or 45D or 45E, etc.) I get the response of "Lake CountyLake District". If I type 49 and anything after it (e.g. 45A or 45B or 45C or 45D or 45E, etc.) I get the response of "Marion County". How do I make it check for the correct third character? |
#5
|
|||
|
|||
Text Form Field question
Nice one
If I may venture an improvement { Set Temp1 "A{ Text1 \*Upper }" }{ IF { Temp1 } = "A45C" "Lake County" }{ IF { Temp1 } = "A45D" "Lake District" }{ IF { Temp1 } = "A49C" "Marion County" } will ensure that whether users enter 45c or 45C etc the correct result will apply. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Tony Jollans wrote: This has all the hallmarks of a "feature". You can get round it by creating a temporary variable/bookmark with a leading non-numric character ... { Set Temp1 "A{ Text1 }" }{ IF { Temp1 } = "A45C" "Lake County" }{ IF { Temp1 } = "A45D" "Lake District" }{ IF { Temp1 } = "A49C" "Marion County" } (all braces via Ctrl+F9 of course) "Graham Mayor" wrote in message ... These are not mergefields but REF fields and it is not essential to put an alternative in a conditional field. If there is no alternative nothing is entered when the condition is not met. What was originally posted should work, but doesn't. Unfortunately I don't see a simple solution while letters and numbers are used in the field result. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org CyberTaz wrote: Hi Ray- It appears there is a problem with your syntax/phrasing for a nested IF. Perhaps this example will put you on the right track: In this example, special rates are offered only to residents of California or Washington. If the State field specifies any other state, no additional text is printed because no alternative text has been specified in the second IF field. {IF {MERGEFIELD State} = "CA" "For California residents, we offer special rates to Asia and Japan." "{IF {MERGEFIELD State} = "WA" "For Washington residents, we offer special rates to Asia and Japan." " "} "} HTH |:) "Ray_Johnson" wrote: I'm using Word 2003. I have a text form field named Text1, regular text, length limited to three characters, fill in enabled, calculate on exit enabled. The form is protected. With the following in Ctrl-F9 braces: { IF { Text1 } = "45C" "Lake County" }{ IF { Text1 } = "45D" "Lake District" }{ IF { Text1 } = "49C" "Marion County" } If I type 45 and anything after it (e.g. 45A or 45B or 45C or 45D or 45E, etc.) I get the response of "Lake CountyLake District". If I type 49 and anything after it (e.g. 45A or 45B or 45C or 45D or 45E, etc.) I get the response of "Marion County". How do I make it check for the correct third character? |
#6
|
|||
|
|||
Text Form Field question
Thanks, and good improvement.
-- Enjoy, Tony "Graham Mayor" wrote in message ... Nice one If I may venture an improvement { Set Temp1 "A{ Text1 \*Upper }" }{ IF { Temp1 } = "A45C" "Lake County" }{ IF { Temp1 } = "A45D" "Lake District" }{ IF { Temp1 } = "A49C" "Marion County" } will ensure that whether users enter 45c or 45C etc the correct result will apply. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Tony Jollans wrote: This has all the hallmarks of a "feature". You can get round it by creating a temporary variable/bookmark with a leading non-numric character ... { Set Temp1 "A{ Text1 }" }{ IF { Temp1 } = "A45C" "Lake County" }{ IF { Temp1 } = "A45D" "Lake District" }{ IF { Temp1 } = "A49C" "Marion County" } (all braces via Ctrl+F9 of course) "Graham Mayor" wrote in message ... These are not mergefields but REF fields and it is not essential to put an alternative in a conditional field. If there is no alternative nothing is entered when the condition is not met. What was originally posted should work, but doesn't. Unfortunately I don't see a simple solution while letters and numbers are used in the field result. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org CyberTaz wrote: Hi Ray- It appears there is a problem with your syntax/phrasing for a nested IF. Perhaps this example will put you on the right track: In this example, special rates are offered only to residents of California or Washington. If the State field specifies any other state, no additional text is printed because no alternative text has been specified in the second IF field. {IF {MERGEFIELD State} = "CA" "For California residents, we offer special rates to Asia and Japan." "{IF {MERGEFIELD State} = "WA" "For Washington residents, we offer special rates to Asia and Japan." " "} "} HTH |:) "Ray_Johnson" wrote: I'm using Word 2003. I have a text form field named Text1, regular text, length limited to three characters, fill in enabled, calculate on exit enabled. The form is protected. With the following in Ctrl-F9 braces: { IF { Text1 } = "45C" "Lake County" }{ IF { Text1 } = "45D" "Lake District" }{ IF { Text1 } = "49C" "Marion County" } If I type 45 and anything after it (e.g. 45A or 45B or 45C or 45D or 45E, etc.) I get the response of "Lake CountyLake District". If I type 49 and anything after it (e.g. 45A or 45B or 45C or 45D or 45E, etc.) I get the response of "Marion County". How do I make it check for the correct third character? |
#7
|
|||
|
|||
Text Form Field question
Thanks to both of you. Graham, I'd already fixed the "c" vs. "C" problem by
making the original convert to all caps, but that's a good thing to keep in mind. -Ray "Tony Jollans" wrote: Thanks, and good improvement. -- Enjoy, Tony "Graham Mayor" wrote in message ... Nice one If I may venture an improvement { Set Temp1 "A{ Text1 \*Upper }" }{ IF { Temp1 } = "A45C" "Lake County" }{ IF { Temp1 } = "A45D" "Lake District" }{ IF { Temp1 } = "A49C" "Marion County" } will ensure that whether users enter 45c or 45C etc the correct result will apply. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Tony Jollans wrote: This has all the hallmarks of a "feature". You can get round it by creating a temporary variable/bookmark with a leading non-numric character ... { Set Temp1 "A{ Text1 }" }{ IF { Temp1 } = "A45C" "Lake County" }{ IF { Temp1 } = "A45D" "Lake District" }{ IF { Temp1 } = "A49C" "Marion County" } (all braces via Ctrl+F9 of course) "Graham Mayor" wrote in message ... These are not mergefields but REF fields and it is not essential to put an alternative in a conditional field. If there is no alternative nothing is entered when the condition is not met. What was originally posted should work, but doesn't. Unfortunately I don't see a simple solution while letters and numbers are used in the field result. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org CyberTaz wrote: Hi Ray- It appears there is a problem with your syntax/phrasing for a nested IF. Perhaps this example will put you on the right track: In this example, special rates are offered only to residents of California or Washington. If the State field specifies any other state, no additional text is printed because no alternative text has been specified in the second IF field. {IF {MERGEFIELD State} = "CA" "For California residents, we offer special rates to Asia and Japan." "{IF {MERGEFIELD State} = "WA" "For Washington residents, we offer special rates to Asia and Japan." " "} "} HTH |:) "Ray_Johnson" wrote: I'm using Word 2003. I have a text form field named Text1, regular text, length limited to three characters, fill in enabled, calculate on exit enabled. The form is protected. With the following in Ctrl-F9 braces: { IF { Text1 } = "45C" "Lake County" }{ IF { Text1 } = "45D" "Lake District" }{ IF { Text1 } = "49C" "Marion County" } If I type 45 and anything after it (e.g. 45A or 45B or 45C or 45D or 45E, etc.) I get the response of "Lake CountyLake District". If I type 49 and anything after it (e.g. 45A or 45B or 45C or 45D or 45E, etc.) I get the response of "Marion County". How do I make it check for the correct third character? |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating dynamic cross reference links in a Word document | Microsoft Word Help | |||
How do I limit the space for a text field in creating a form? | Microsoft Word Help | |||
In Form Field Text is word wrapping possible? | Microsoft Word Help | |||
Enter data in 1 text form field & have multiple locations fill | Microsoft Word Help | |||
How do I spell check text in a text form field? | Microsoft Word Help |