Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Debbie[_3_] Debbie[_3_] is offline
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
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

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mailmerge date fields - using switches to change format JK Mailmerge 1 March 10th 09 11:01 PM
Fields and Switches joe925c Microsoft Word Help 3 February 16th 09 05:56 AM
MailMerge One Field Ignored/Other Fields \f Switches Ignored Robin Mailmerge 6 January 14th 09 11:55 PM
Hyperlink switches Theresa Microsoft Word Help 1 April 16th 07 06:06 AM
Mailmerge with Excel spreadsheet switches columns to display SharronTucker Mailmerge 1 August 9th 05 06:31 PM


All times are GMT +1. The time now is 10:23 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"