If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Mailmerge Switches
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 |
#2
|
|||
|
|||
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 |
Thread Tools | |
Display Modes | |
|
|