View Single Post
  #8   Report Post  
Judith
 
Posts: n/a
Default

Brilliant - it works exactly how I wanted it to (once I had remembered that I
needed to do MM rather than mm for the month!) Thanks a lot for the
suggestion.
--
Judith


"Graham Mayor" wrote:

{IF {MERGEFIELD Date_Paid \@ "yyyyMMdd"} 20050101 "This membership has
expired"
"This membership is current"}

should do the trick - see http://www.gmayor.com/formatting_word_fields.htm

--

Graham Mayor - Word MVP

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



Judith wrote:
I want to compare a MERGEFIELD date that has been extracted from an
Access database with a typed in value as part of an If...then...else
statement. For example, if the Date_Paid field is less than
01/01/2005 I want to insert text to say that the person's membership
has expired.

The syntax I came up with is
{IF {MERGEFIELD Date_Paid} 01/01/2005 "This membership has expired"
"This membership is current"}
but it doesn't work. I have also tried adding a date pattern of \@
dd/MM\yyyy, and using quotes around the coparison date.

I am using Word 2003.