Solved

Access 2003: MailMerge Automation (question 3 - if..then..else...

Posted on 2012-04-09
3
253 Views
Last Modified: 2012-08-14
Hi EE,

Anybody knows how IF  THEN ELSE works as a field in a mail merge

Want to do:

If title = " " then N/A  ELSE title

i tried it.... and do not see it working


below is a sample document.....

tx so much, sandra

scrnMSPE-SHORT23doc.doc
0
Comment
Question by:mytfein
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
ID: 37825660
The IF dialogue won't accept fields for the True or the False parts. If you do use the diaolhgur, you will have to enter some text and change it into a field.

In general, set the display to show field codes rather than field results with the Alt+F9 toggle, so that <<Clerkship_Title_1>> looks like

{ MERGEFIELD Clerkship_Title_1 }. You can select the text and press Ctrl+F9 to field delimiters around the field so that the field is the only content of a surrounding field:

 { { MERGEFIELD Clerkship_Title_1 } }

You can then insert an IF and a condition

 { IF { MERGEFIELD Clerkship_Title_1 }  = "" }

and add some text:

{ IF { MERGEFIELD Clerkship_Title_1 }  = "" "Empty" "Text" }

or a field:

{ IF { MERGEFIELD Clerkship_Title_1 }  = "" "" "{  MERGEFIELD "Clerkship_Comments_1 }" }

Remember that if you now toggle back to show field results, the whole text will probably disappear until the merge is done or previewed.
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 37825669
"If you do use the diaolhgur, you will have to enter some text and change it into a field."

should be :

"If you do use the dialogue, you will have to enter some text and overwrite it in the document with a field in the 'field code' view"
0
 

Author Comment

by:mytfein
ID: 37827940
Hi Graham,

tx so much for explaining about
              field code view,  and how to code If..else  in that view....


in your example:

{ IF { MERGEFIELD Clerkship_Title_1 }  = "" "" "{  MERGEFIELD "Clerkship_Comments_1 }" }

shour there be a commas between both spaces like this:

{ IF { MERGEFIELD Clerkship_Title_1 }  = " ", " ", {  MERGEFIELD "Clerkship_Comments_1 }" }

if title1 = blank, then blank, else title1  (like the Access IIF function)

pls advise, tx, s
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question