Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-30-2015, 07:37 PM
sunaina_ssl@yahoo.com.au sunaina_ssl@yahoo.com.au is offline The use of IF field codes in Word 2010 Windows 7 64bit The use of IF field codes in Word 2010 Office 2010 64bit
Novice
The use of IF field codes in Word 2010
 
Join Date: Nov 2015
Posts: 2
sunaina_ssl@yahoo.com.au is on a distinguished road
Default The use of IF field codes in Word 2010

I need to be able to use an IF field to determine the text that should appear at a location depending on what was selected in a drop down list.
Can I do this? I have tried the below code and but it does not work.



{ IF "BNTYPE" = "Manager" "1" "0" }

here I am trying to say that the drop down list has been bookmarked as BNTYPE and I need it to say either true or false depending on whether Manager is selected in the drop down list or not.

Can anyone help please? Thanks.
Reply With Quote
  #2  
Old 11-30-2015, 08:32 PM
macropod's Avatar
macropod macropod is offline The use of IF field codes in Word 2010 Windows 7 64bit The use of IF field codes in Word 2010 Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,374
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

I assume you're using formfields - the technique you're trying to implement doesn't work with content controls or Active-x controls..

You need to use a cross-reference to the BNTYPE bookmark in the IF field:
{IF{REF BNTYPE}= Manager 1 0}
or:
{IF{REF BNTYPE}= Manager True False}
The BNTYPE dropdown also needs to have its 'calculate on exit' property checked.

Note: The field brace pairs (i.e. '{ }') for the above example are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message. Nor is it practical to add them via any of the standard Word dialogues.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 12-01-2015, 08:14 PM
sunaina_ssl@yahoo.com.au sunaina_ssl@yahoo.com.au is offline The use of IF field codes in Word 2010 Windows 7 64bit The use of IF field codes in Word 2010 Office 2010 64bit
Novice
The use of IF field codes in Word 2010
 
Join Date: Nov 2015
Posts: 2
sunaina_ssl@yahoo.com.au is on a distinguished road
Default Helps but...

Thanks for that, it definitely helps!!

However, there does not seem to be a calculate on exit property for the drop down box anywhere that I looked! So it does not automatically update unless I ask update the field myself.

Any suggestions please?

Thanks again.
Reply With Quote
  #4  
Old 12-01-2015, 08:54 PM
macropod's Avatar
macropod macropod is offline The use of IF field codes in Word 2010 Windows 7 64bit The use of IF field codes in Word 2010 Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,374
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

In which case, you're probably not using formfields. What kind of controls are you using?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
field codes



Similar Threads
Thread Thread Starter Forum Replies Last Post
The use of IF field codes in Word 2010 Need help with Field Codes Cosmo Mail Merge 25 07-30-2015 01:25 PM
Copying Raw Field Codes ptmuldoon Word 3 01-04-2015 02:50 PM
The use of IF field codes in Word 2010 How to hide field codes from others? lucky16 Word VBA 2 10-24-2014 03:52 AM
Formula Field using Field Codes hunter2193 Word 3 04-05-2013 04:58 AM
The use of IF field codes in Word 2010 Word Equation field codes mkarthic Word 1 12-02-2011 02:09 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:10 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