View Single Post
  #2  
Old April 30th, 2010, 06:02 PM posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
external usenet poster
 
Posts: 4,550
Default Mailmerge Switches

It kinda depends on where your checkbox data is coming from, and how you
are connecting to that data. The simplest thing is probably to insert
your mergefield

{ MERGEFIELD "FT Contract" }

and see what results you get for each of the two possible values in your
datasource (assuming you don't also have a third "unspecified" value).

If it's Access,...the value that Word receives from a
boolean/Yes/No/True/False field in Access depends primarily on the
method you use to connect to Access - AFAIK they are as follows:
Connection method "Yes" "No"
DDE -1 0
ODBC 1 0
OLE DB True False

I think one of the following nested fields will work, but I've lifted
this from one of my earlier messages without checking, so you will need
to check for yourself.

{ IF { =IF({ MERGEFIELD "FT Contract" },1,0) } = 1 "{ MERGEFIELD Start
}""N/A"}
or
{ =IF({ MERGEFIELD "FT Contract" },1,-1) \#"'{ MERGEFIELD Start }';'N/A'" }

Every pair of {} has to be a pair of the special field code braces that
you can enter using ctrl-F9)

Peter Jamieson

http://tips.pjmsn.me.uk

On 30/04/2010 16:35, Debbie wrote:
How would I do an IF statement where IF a check box is null then do
nothing but if yes, then enter a field.

This is what I am trying to do - { IF {MERGEFIELD FT Contract} = TRUE
(or "") then insert {MERGEFIELD "Start"} otherwise enter text "N/
A"} " }

This is the formula I am using but can't get it to work.

{ IF "{MERGEFIELD FT Contract}" = TRUE "{MERGEFIELD Start}" {"N/A"}
" }

I am thinking it is something like this but it does not work.
Any help would be greatly appreciated.
Thanks in advance.

Debbie