Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Apr 2003
    Location
    Jacksonville, North Carolina, USA
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have a 2003 Microsoft Word memo document that I am merging with an Access Database file. I want the memo to reflect the information in the database field Phone2 however if Phone2 is empty then I want the memo to state "Did not provide alternate info".

    I have tried to use the If...then...else but obviously I am not doing something correctly. Any help appreciated.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    [quote name='bbrown5' post='764682' date='10-Mar-2009 21:19']I have a 2003 Microsoft Word memo document that I am merging with an Access Database file. I want the memo to reflect the information in the database field Phone2 however if Phone2 is empty then I want the memo to state "Did not provide alternate info".

    I have tried to use the If...then...else but obviously I am not doing something correctly. Any help appreciated.[/quote]
    The easiest solution is to create a query in Access with a field like this:

    ThePhone: Nz([Phone2],"Did not provide alternate info")

    and use the query as data source.

    Another solution would be a field in Word of the form

    { IF { MERGEFIELD "Phone2" } = "" "Did not provide alternate info" "{MERGEFIELD "Phone2" }" }

    Remember, never type the field braces { } yourself, press Ctrl+F9 to insert them.

  3. #3
    2 Star Lounger
    Join Date
    Apr 2003
    Location
    Jacksonville, North Carolina, USA
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='764688' date='10-Mar-2009 21:31']The easiest solution is to create a query in Access with a field like this:

    ThePhone: Nz([Phone2],"Did not provide alternate info")

    and use the query as data source.

    Another solution would be a field in Word of the form

    { IF { MERGEFIELD "Phone2" } = "" "Did not provide alternate info" "{MERGEFIELD "Phone2" }" }

    Remember, never type the field braces { } yourself, press Ctrl+F9 to insert them.[/quote]

    Thanks!!! I was using Phone2 insteadof "Phone2".

  4. #4
    3 Star Lounger
    Join Date
    Mar 2009
    Location
    Hong Kong
    Posts
    359
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='764688' date='11-Mar-2009 04:31']{ IF { MERGEFIELD "Phone2" } = "" "Did not provide alternate info" "{MERGEFIELD "Phone2" }" }[/quote]

    Do you actually need {QUOTE} in this case?
    That's, {QUOTE{ IF { MERGEFIELD "Phone2" } = "" "Did not provide alternate info" "{MERGEFIELD "Phone2" }"}}

    Armstrong

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    I don't think QUOTE is necessary here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •