Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
donna donna is offline
external usenet poster
 
Posts: 109
Default How do I make fields grey out automatically when irrelevant?

I am trying to make a request form on which I want to force the user to
complete all applicable fields. Can I format the request form so that
dependant on the users answers only the applicale fields are show?
Example:
Question: Are you: full time or part time?
Question: How many hours do you work?

The second question is not applicable to full time employees as they have
standard hours so I would like to make the check box unavailable for those
who answer full time.

Please help - I need this done by Tuesday!!

  #2   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default How do I make fields grey out automatically when irrelevant?

As an example. Let's say that you have a checkbox field 'check1' which is
checked for full time work
and that you have a text form field 'Text1' which collects the hours worked.
If you run the following macro on exit from the Text1 field, if anything is
entered in that field, when Check1 is checked the content is removed from
Text 1 and a warning message popped up, before moving on to the next field.

Sub AOnExit()
If ActiveDocument.FormFields("Check1").CheckBox.Value = True Then
If Len(ActiveDocument.FormFields("Text1").Result) 0 Then
'*******
ActiveDocument.FormFields("Text1").Result = ""
'*******
MsgBox "Full time worker. This box is not applicable"
End If
End If
End Sub

http://www.gmayor.com/installing_macro.htm

There are some useful pages on Greg Maxey's web site about forms, start with
http://gregmaxey.mvps.org/Form_Fields_Master.htm


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




Donna wrote:
I am trying to make a request form on which I want to force the user
to complete all applicable fields. Can I format the request form so
that dependant on the users answers only the applicable fields are
show? Example:
Question: Are you: full time or part time?
Question: How many hours do you work?

The second question is not applicable to full time employees as they
have standard hours so I would like to make the check box unavailable
for those who answer full time.

Please help - I need this done by Tuesday!!



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Lighter shade of grey for fields? LurfysMa New Users 7 May 28th 07 09:10 PM
no longer able to tb between grey fields L. Oliver Page Layout 1 August 6th 05 05:15 PM
How to remove grey background for merge fields? Bianca Mailmerge 1 May 24th 05 12:19 PM
How do I get rid of the grey brackets that appear with form fields Dai_Tau_Lo Tables 1 April 26th 05 06:42 PM
how do you make the grey line between two pages? Michelle Page Layout 1 April 15th 05 02:20 AM


All times are GMT +1. The time now is 08:06 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"