Reply
 
Thread Tools Display Modes
  #1   Report Post  
Ray_Johnson
 
Posts: n/a
Default 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   Report Post  
CyberTaz
 
Posts: n/a
Default 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   Report Post  
Graham Mayor
 
Posts: n/a
Default 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   Report Post  
Tony Jollans
 
Posts: n/a
Default 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   Report Post  
Graham Mayor
 
Posts: n/a
Default 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   Report Post  
Tony Jollans
 
Posts: n/a
Default 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   Report Post  
Ray_Johnson
 
Posts: n/a
Default 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

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 dynamic cross reference links in a Word document torajudo Microsoft Word Help 5 April 27th 23 08:57 PM
How do I limit the space for a text field in creating a form? MMC Microsoft Word Help 2 June 28th 05 10:01 PM
In Form Field Text is word wrapping possible? Billie S Microsoft Word Help 1 March 22nd 05 08:28 PM
Enter data in 1 text form field & have multiple locations fill Lee Microsoft Word Help 1 March 16th 05 10:56 PM
How do I spell check text in a text form field? Credit Analyst Microsoft Word Help 4 December 14th 04 10:07 PM


All times are GMT +1. The time now is 10:23 AM.

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"