I have 3 date fields in an access database. Date1, Date2 and Date3.
It is possible that either 1, 2 or all 3 will have date data in them. Date3
will not have data if Date2 is blank.
I want to have a mailmerge add different wording if ONLY Date1 has a date,
OR Date1 and Date2 have dates, OR all 3 have dates in them. My idea is to
look what happens if Date1 is blank, then look at what happens if Date2 and
Date3 have data in them.
How can I code this in the word document.
Can I say something along the lines of {If {MERGEFIELD Date1} <> "" AND {If
{MERGEFIELD Date2} <>"" "print this" "else print this"}. If so, what is the
exact context? I have tried using AND, but it didn't work.
dixie - 04 Nov 2004 02:18 GMT
It's OK, I sat down with a pen and paper - old technology - and thought
through the logic and then manually built one that does what I want
perfectly.
dixe
>I have 3 date fields in an access database. Date1, Date2 and Date3.
> It is possible that either 1, 2 or all 3 will have date data in them.
[quoted text clipped - 9 lines]
> {If {MERGEFIELD Date2} <>"" "print this" "else print this"}. If so, what
> is the exact context? I have tried using AND, but it didn't work.
Doug Robbins - 04 Nov 2004 12:11 GMT
There's no avoiding working out the logic.

Signature
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.
Hope this helps,
Doug Robbins - Word MVP
> It's OK, I sat down with a pen and paper - old technology - and thought
> through the logic and then manually built one that does what I want
[quoted text clipped - 15 lines]
>> {If {MERGEFIELD Date2} <>"" "print this" "else print this"}. If so, what
>> is the exact context? I have tried using AND, but it didn't work.
dixie - 04 Nov 2004 12:24 GMT
Just enunciating or talking through the problem seems to make your mind work
on it in the background. I sometimes suddenly work out how to do something
when I am not even thinking about it. It is the best way.
dixie
> There's no avoiding working out the logic.
>
[quoted text clipped - 17 lines]
>>> {If {MERGEFIELD Date2} <>"" "print this" "else print this"}. If so,
>>> what is the exact context? I have tried using AND, but it didn't work.
rushak - 05 Nov 2004 22:31 GMT
Can I ask you how you did this? I have the same question except I want to do
this:
{IF {MERGEFIELD Field1} = "A" AND {IF {MERGEFIELD Field2} = "B" THEN "Do
This" ELSE "nothing".
I haven't had any luck looking for an answer.
> Just enunciating or talking through the problem seems to make your mind work
> on it in the background. I sometimes suddenly work out how to do something
[quoted text clipped - 23 lines]
> >>> {If {MERGEFIELD Date2} <>"" "print this" "else print this"}. If so,
> >>> what is the exact context? I have tried using AND, but it didn't work.
dixie - 06 Nov 2004 00:10 GMT
I see you got a reply to the same question under another post, so I won't
bother typing in all those braces :-). I used a similar method to Greg
Maxey
dixie
> Can I ask you how you did this? I have the same question except I want to
> do
[quoted text clipped - 37 lines]
>> >>> what is the exact context? I have tried using AND, but it didn't
>> >>> work.