View Single Post
  #4   Report Post  
Graham Mayor
 
Posts: n/a
Default

It appears to be the leading 5 which causes the error. The condition sees
this as a numeric field and ignores the rest. Ensuring that the data does
not start with a 5 seems to do the trick (at least with your quoted data).
Add a couple of spaces in the field construction e.g.

{ IF " { MERGEFIELD AHD_pgm_id }" = " 5x5 Team-AG" "Al Gianotti," "" }

This produces a true result only for a data field that contains - 5x5
Team-AG


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Rong wrote:
From Rong
statement is in Word 2003, letter document
There is a select in the first line of the letter to bypass records
if there is NOT a 5x5 int he AHD_PGM_ID field, this works fine.
The problem statement is (sampleis without paran's)

if mergefield AHD_pgm_id = "5x5 Team-AG" " Al Gianotti, " ""
it does the replace for other then that condition

data is in a sheet of an excel workbood - 2003
this is a sample of the data which is treated as = to the test and
the name is displayed in the letters
5x5 Team-PB
5x5
5x5
5x5 Team-DU

I am trying to replace those initials with the proper complete name.
there are a series fo 10 'teams'
Is there some other solution?
Rong




"Graham Mayor" wrote:

Perhaps if you were to explain *exactly* what it is you are doing we
could advise where you are going wrong.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




Rong wrote:
I am using the 'if.. then ...else' to put values into the word
letter. Works fine when the value is there, but it also puts the
value in when the condition is not true??
Also I would like to next this capability I have 10 codes to replace
with Names.
any help on either situation thanks Rong