Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 02-27-2020, 02:54 PM
macropod's Avatar
macropod macropod is offline IF Statement not working Windows 7 64bit IF Statement not working Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,385
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by shawn.low@cox.net View Post
I added this simple code.


{IF {MERGREFIELD TableStart:BorrowerProductQuery \*MERGEFORMAT}{MERGEFIELD Selected_Product_Frequency \*MERGEFORMAT}{MERGEFIELD TableEnd:BorrowerProductQuery \*MERGEFORMAT } = "Bi-Weekly" "" "Hello" }
If you wanted to have 'Hello' between the two tables when the frequency is Bi-Weekly, you use only:
{IF{MERGEFIELD Selected_Product_Frequency}= "Bi-Weekly" "Hello"}
between those two tables. As it is, you have an IF test that incorporates the whole 'BorrowerProductQuery' table as part of the condition being tested against 'Bi-Weekly'. That'll never fly.
Quote:
Originally Posted by shawn.low@cox.net View Post
I know you don't think the MERGEFIELD and MERGEFORMAT aren't needed, but Word adds these, I don't. I use the >Insert > Quick Parts > Field > MergeField
I type in the name of the field in the "Field Name" field. Then click "ok"
I actually said only that the \* MERGEFORMAT switch is unnecessary. The MERGEFIELD designation is most definitely required. You're getting the \* MERGEFORMAT switches because you're leaving the 'Preserve formatting during updates' option checked when you insert the fields. Word will also add them (rather unhelpfully) if you reformat the fields after inserting them.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting a Select statement in Excel to an update statement shabbaranks Excel Programming 5 10-31-2018 11:47 PM
Tasks Switch to Non-Working Days on Working Calendar danelloc Project 3 10-02-2017 12:38 PM
Help with IF statement kevinU Excel 0 03-15-2017 02:11 PM
IF Statement not working IF statement mrry475 Excel 1 09-06-2016 09:30 AM
IF Statement not working IF Statement teza2k06 Excel 1 03-11-2015 12:44 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:59 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft