Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-21-2016, 07:30 AM
DrMarfelters DrMarfelters is offline Form text hidden and unhidden with checkbox? Windows 7 64bit Form text hidden and unhidden with checkbox? Office 2007
Novice
Form text hidden and unhidden with checkbox?
 
Join Date: Jul 2016
Posts: 3
DrMarfelters is on a distinguished road
Default Form text hidden and unhidden with checkbox?

Hi everyone,
I'm trying to design some forms for use in my clinic. What I would like to have is a few checkboxes that outline which areas I examined (I.e. Shoulder exam, back exam, foot exam), and once I check that box, the rest of the form that is relevant to that selection will appear.

Ideally, the form would start out looking short and mostly blank when I start filling it out, but once I select which examinations I did, the relevant fields appear for me to fill out.



I have all the fields and text that I want to appear listed currently, but it makes the form very cluttered and wasteful for everything to appear regardless of whether it is relevant to that patient or not.

Has anyone ever seen something like this done?
Reply With Quote
  #2  
Old 07-23-2016, 11:44 PM
DougMVP DougMVP is offline Form text hidden and unhidden with checkbox? Windows 7 32bit Form text hidden and unhidden with checkbox? Office 2010 32bit
Advanced Beginner
 
Join Date: Nov 2013
Posts: 50
DougMVP will become famous soon enough
Default

What type of controls are you using on the form? Legacy FormFields as used in a document that is protected for filling in forms or ActiveX controls (I assume that as you mention checkboxes that you are not using Content Controls as there is no Content Control checkbox in Word 2007.

If using Legacy FormFields and you set the form up as a table with the area of examination and its corresponding checkbox in the first (narrow) column and the related fields and text in the second column, and you format all of the text in the second column so that its font is hidden, the if you set a macro containing the following code to run on exit from each of the checkboxes:
Code:
Sub ShowExamForm()
ActiveDocument.Unprotect
With Selection.Rows(1)
    If .Cells(1).Range.FormFields(1).CheckBox.Value = True Then
        .Cells(2).Range.Font.Hidden = False
    Else
        .Cells(2).Range.Font.Hidden = True
    End If
End With
ActiveDocument.Protect wdAllowOnlyFormFields, NoReset
End Sub
and you protect the document for filling forms, when you check one of the boxes, the related text and fields will appear.

This assumes that you do not have the display of hidden text enabled.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unhidden Heading Numbering snmuvz Word 5 02-04-2015 08:01 PM
Help: how to replace hidden text with unhidden text when typing over jdcornelius Word 6 03-28-2014 01:19 PM
Outlook 2007 form checkbox lockdown Bridge89 Outlook 0 06-05-2013 09:23 AM
Form text hidden and unhidden with checkbox? Hidden style applied over already-hidden text. christie Word 1 08-17-2011 09:10 AM
Use Form Checkbox to Add Table laxonator Word Tables 0 10-23-2008 06:21 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:13 AM.


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