Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / April 2006

Tip: Looking for answers? Try searching our database.

IF statements not working

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jermsalerms79 - 12 Apr 2006 14:41 GMT
I am trying to use a mail merge with the following if then statement and it
is returning the false response on everything even if the result is true. Am
I writing the formula wrong. I am using ctrl - F9 to insert { }.

Here is the formula:

{ IF{ MERGEFIELD Purpose_LOANPURPOSE } = "Purchase" "Purchase" "Refi"}

so if the field is purchase the result should be purchase and if it is not
then the result is refi.
Cindy M  -WordMVP- - 12 Apr 2006 15:34 GMT
Hi =?Utf-8?B?amVybXNhbGVybXM3OQ==?=,

> I am trying to use a mail merge with the following if then statement and it
> is returning the false response on everything even if the result is true. Am
[quoted text clipped - 6 lines]
> so if the field is purchase the result should be purchase and if it is not
> then the result is refi.

Well, you do need a space between IF and the start of the mergefield brackets.

You might also try placing the Mergefield in "quotes".

The only other thing I can suggest would be to insert the mergefield outside
the IF so that you can see if the values you expect are truly coming through.
You could get unexpected result if, for example, you think you've got a text
field (because that's what you see in your database form), and in reality the
field is passing a number. I could imagine, in this case, that in the database
a lookup table has been defined for these values, and that in reality, an ID
number is being stored in this field, rather than the related text.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.