[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2012-04-09
3
Medium Priority
?
255 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 2000 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

649 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