Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #12  
Old 04-12-2021, 02:58 PM
macropod's Avatar
macropod macropod is offline AutoFill Information Windows 10 AutoFill Information Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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 shaun0406 View Post
My field code is
{IF { Company }="X" "(111)111-1111" {IF {Company}="Y" "(234)567-8910"}}}

After protecting the document, for example, selecting "X" from the drop down list doesn't update the field code I wrote for autofill phone numbers when a Company drop down list have been selected

Please give help or give me suggestions as what I am doing wrong.
The problem is the way you're referencing the dropdown, plus the lack of required spaces in the field code. Instead of:
Code:
{IF { Company }="X" "(111)111-1111" {IF {Company}="Y" "(234)567-8910"}}}
use:
Code:
{IF{REF Company}= "X" "(111)111-1111"}{IF{REF Company}= "Y" "(234)567-8910"}
As Charles said, though, you really shouldn't use formfields and content controls in the same document; they don't play well together.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
auto fill, auto generate, autofill, content controls, fields word functions, word vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
AutoFill Information Question about autofill oscarlimerick Excel 3 01-15-2021 04:12 AM
Combo Box and AutoFill samrosen Word VBA 5 08-03-2016 05:12 AM
Creating AutoFill form - AutoFill information depending on a selection. RyanHarper Word 3 06-15-2015 01:01 PM
Autofill Stacybug1 Excel 2 01-28-2015 01:04 PM
AutoCorrect Or AutoFill Johnny thunder Outlook 0 05-02-2011 03:37 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:29 PM.


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