There are three fields SUBJECT_CODE, STUDENT_NAME, TUTOR_NAME. In all cases,
the Subject_Code field will be populated, but either the Student_Name field
or the Tutor_Name field (never both). I want to put in a command to only
merge the Subject_Code field IF the Tutor_Name field is populated. I have
used the help function and found the example below, which I have tried to
adapt to say IF mergefield Tutor_Name is not blank merge mergefield
Subject_Code or if false put nothing, but it didn't work.
"If the Company data field for a data record contains any information — that
is, if the field is not blank — Word prints text from the CompanyAddress
field. Otherwise, Word prints text from the HomeAddress field."
{ IF { MERGEFIELD Company } <> " " "{ MERGEFIELD CompanyAddress }" "{
MERGEFIELD HomeAddress }" }
This is what I put:
{ IF { MERGEFIELD TM_Name} <> "{MERGEFIELD Socrates_Subject_Code }" " ""}
But no luck. I don't really have any knowledge of programming, everything I
know (which is little) is self taught and done by trial and error! I'd be
very grateful for some help. If I can't solve this, I'm going to have to
redesign my database, which I would rather not do.
Thank you in advance.
Graham Mayor - 23 Aug 2006 12:13 GMT
{IF{Mergefield Tutor_Name} <> "" "{Mergefield Subject_Code}"}
should work

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> There are three fields SUBJECT_CODE, STUDENT_NAME, TUTOR_NAME. In
> all cases, the Subject_Code field will be populated, but either the
[quoted text clipped - 24 lines]
>
> Thank you in advance.
HelenC - 24 Aug 2006 08:49 GMT
It worked! Thank you so much.
> {IF{Mergefield Tutor_Name} <> "" "{Mergefield Subject_Code}"}
> should work
[quoted text clipped - 27 lines]
> >
> > Thank you in advance.
Graham Mayor - 24 Aug 2006 10:33 GMT
You are welcome.

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> It worked! Thank you so much.
>
[quoted text clipped - 37 lines]
>>>
>>> Thank you in advance.