Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Maria Maria is offline
external usenet poster
 
Posts: 59
Default Conditional If statement

I am working on a mail merge label that if the Age field is less than 13 the
ParentName field needs to appear underneath the ChildName field.

The If statement below is working correctly if there is a figure in Age
however, if that field is blank it is creating a blank label with the
ParentName in it.

{If "13" "{mergefield ParentName}" ""}

Any ideas would be greatly appreciated. Thanks
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod macropod is offline
external usenet poster
 
Posts: 1,002
Default Conditional If statement

Hi Maria,

If your Age field is empty, it should evaluate to 0, so the parent's name would be expected to appear in such cases. But so should
the child's name, so I don't understand the bit about the "blank label with the ParentName in it". Perhaps you could give a bit more
explanation about this.

If you're simply trying to suppress the parent's name when the child's age is missing, try:
{IF{MERGEFIELD Age} 0 {IF{MERGEFIELD Age} 13 {MERGEFIELD ParentName}}}

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"Maria" wrote in message ...
I am working on a mail merge label that if the Age field is less than 13 the
ParentName field needs to appear underneath the ChildName field.

The If statement below is working correctly if there is a figure in Age
however, if that field is blank it is creating a blank label with the
ParentName in it.

{If "13" "{mergefield ParentName}" ""}

Any ideas would be greatly appreciated. Thanks


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Maria Maria is offline
external usenet poster
 
Posts: 59
Default Conditional If statement

Thank you very much, that was also what needed to be accomplished, if there
was no Age then it should be blank instead of returning the parentname. Your
input was greatly appreciated and your if statement worked correctly.

Thanks again.

"macropod" wrote:

Hi Maria,

If your Age field is empty, it should evaluate to 0, so the parent's name would be expected to appear in such cases. But so should
the child's name, so I don't understand the bit about the "blank label with the ParentName in it". Perhaps you could give a bit more
explanation about this.

If you're simply trying to suppress the parent's name when the child's age is missing, try:
{IF{MERGEFIELD Age} 0 {IF{MERGEFIELD Age} 13 {MERGEFIELD ParentName}}}

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"Maria" wrote in message ...
I am working on a mail merge label that if the Age field is less than 13 the
ParentName field needs to appear underneath the ChildName field.

The If statement below is working correctly if there is a figure in Age
however, if that field is blank it is creating a blank label with the
ParentName in it.

{If "13" "{mergefield ParentName}" ""}

Any ideas would be greatly appreciated. Thanks



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
which statement right , question is Choose the correct statement? how many template?when we click new doc Microsoft Word Help 1 October 16th 06 11:15 AM
which statement right , question isChoose the correct statement? how many template?when we click new doc Microsoft Word Help 1 October 15th 06 11:20 PM
IF Statement Shoelaces Mailmerge 5 November 23rd 05 06:54 AM
Conditional Slash Similar to Conditional Hyphen? Oliver St Quintin Page Layout 7 May 10th 05 09:41 PM
Need help with conditional if statement Jan Mailmerge 1 March 24th 05 09:14 PM


All times are GMT +1. The time now is 01:41 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"