Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-17-2014, 03:29 PM
inquirer inquirer is offline Hide/Unhide a Block of Text Based on Choice Selection Windows 7 64bit Hide/Unhide a Block of Text Based on Choice Selection Office 2010 64bit
Novice
Hide/Unhide a Block of Text Based on Choice Selection
 
Join Date: Sep 2014
Posts: 4
inquirer is on a distinguished road
Default Hide/Unhide a Block of Text Based on Choice Selection

I have a performance evaluation form as attached where employees are measured on their core competencies. They will be evaluated either with "Satisfactory" or "Improvement Needed" from the drop-down list. Here's what I'm struggling with. If "Improvement Needed" is selected, I want the "Improvement Plan" section to show up, otherwise that section would not show up. Any suggestions?
Attached Files
File Type: docx evaluation_form.docx (40.2 KB, 47 views)
Reply With Quote
  #2  
Old 09-17-2014, 10:32 PM
gmayor's Avatar
gmayor gmayor is offline Hide/Unhide a Block of Text Based on Choice Selection Windows 7 64bit Hide/Unhide a Block of Text Based on Choice Selection Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,098
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

It just needs a conditional field to evaluate the values of the two dropdowns that meet the criteria and display the text accordingly - see attached.
The field is updated when you tab out of either dropdown field.
Attached Files
File Type: docx evaluation_form.docx (36.6 KB, 171 views)
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 09-18-2014, 08:41 AM
inquirer inquirer is offline Hide/Unhide a Block of Text Based on Choice Selection Windows 7 64bit Hide/Unhide a Block of Text Based on Choice Selection Office 2010 64bit
Novice
Hide/Unhide a Block of Text Based on Choice Selection
 
Join Date: Sep 2014
Posts: 4
inquirer is on a distinguished road
Default

How do you set a conditional field?
Reply With Quote
  #4  
Old 09-18-2014, 10:53 AM
gmaxey gmaxey is offline Hide/Unhide a Block of Text Based on Choice Selection Windows 7 32bit Hide/Unhide a Block of Text Based on Choice Selection Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,378
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

What improvement plan? There is no improvement plan in the document you attached.

Set a macro similar to the following to run on exit from your dropdown evaluation fields:

HTML Code:
Sub Evaluate()
Dim oFld As Word.FormField
  If Selection.FormFields.Count = 1 Then
    Set oFld = ActiveDocument.FormFields(Selection.FormFields(1).Name)
  ElseIf Selection.FormFields.Count = 0 And Selection.Bookmarks.Count > 0 Then
    Set oFld = ActiveDocument.FormFields(Selection.Bookmarks(Selection.Bookmarks.Count).Name)
  End If
  Select Case oFld.Name
    Case "Dropdown1"
      If oFld.Result = "Improvement Needed" Then
        MsgBox "Show plan 1"
      Else
        MsgBox "Hide plan 2"
      End If
    Case "Dropdown2"
      If oFld.Result = "Improvement Needed (Below Satisfactory) (I)" Then
        MsgBox "Show plan 2"
      Else
        MsgBox "Hide plan 2"
      End If
  End Select
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #5  
Old 09-18-2014, 09:06 PM
gmayor's Avatar
gmayor gmayor is offline Hide/Unhide a Block of Text Based on Choice Selection Windows 7 64bit Hide/Unhide a Block of Text Based on Choice Selection Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,098
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Quote:
Originally Posted by inquirer View Post
How do you set a conditional field?
See the attachment I posted. Press ALT+F9 to display the field structure.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #6  
Old 09-19-2014, 11:29 AM
inquirer inquirer is offline Hide/Unhide a Block of Text Based on Choice Selection Windows 7 64bit Hide/Unhide a Block of Text Based on Choice Selection Office 2010 64bit
Novice
Hide/Unhide a Block of Text Based on Choice Selection
 
Join Date: Sep 2014
Posts: 4
inquirer is on a distinguished road
Default

Thank you for your responses. The Improvement Plan is a separate form and the folks know where to get it. So I just need that section to pop up when they are rated with "Improvement Needed". As you said, the conditional field works if you tab out of it. The problem is folks will not know that they have to do the tabbing. The macro would be a better option but I couldn't get it to work as I'm relatively new with this. I get the idea about making the macro to run on exit from the dropdown evaluation field, but the macro code itself requires some tweaking. I'm not sure how to code the macro to show/hide that block of text based on selection from the dropdown field. Any further clarification would be appreciated.
Reply With Quote
  #7  
Old 09-19-2014, 09:32 PM
gmayor's Avatar
gmayor gmayor is offline Hide/Unhide a Block of Text Based on Choice Selection Windows 7 64bit Hide/Unhide a Block of Text Based on Choice Selection Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,098
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

A macro would merely have to update the fields to update the conditional field. e.g.

Code:
Sub UpdateMacro1()
ActiveDocument.Range.Fields.Update
End Sub
is all that is needed; however you cannot force a user to run macros, so you would be better instructing the users to tab through the fields as this doesn't require macros. You can add help text to the field or use an accompanying instruction.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #8  
Old 09-22-2014, 04:41 PM
inquirer inquirer is offline Hide/Unhide a Block of Text Based on Choice Selection Windows 7 64bit Hide/Unhide a Block of Text Based on Choice Selection Office 2010 64bit
Novice
Hide/Unhide a Block of Text Based on Choice Selection
 
Join Date: Sep 2014
Posts: 4
inquirer is on a distinguished road
Default

Thank you, I will look into that.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide/Unhide a Block of Text Based on Choice Selection Adding text to after a bookmark based on drop down menu choice ksigcajun Word VBA 6 06-10-2014 09:39 AM
block selection in dropdown list Intruder Excel 2 01-10-2013 10:20 AM
Hide/Unhide pictures maloneb PowerPoint 1 01-18-2012 03:34 PM
Macro to populate a text form field based on dropdown selection koloa Word 0 10-20-2011 11:52 AM
Hide/Unhide a Block of Text Based on Choice Selection Unhide and Re-hide in Excel 2003 thorgal67 Excel 1 07-16-2009 07:06 AM

Other Forums: Access Forums

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


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