Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
ab ab is offline
external usenet poster
 
Posts: 13
Default If field in forms

I have created a form to be filled in using Word 2003. I have two drop-down
boxes which I need to link somehow.

What I want to do is:

If the name in the first drop-down box is "John Smith"

The qualification in the next drop-down box is "ARIBA"

If the name in the first drop-down box is "Jane Brown",

The qualification in the next drop-down box is "ARICS"

Help would be appreciated please.

TIA


  #2   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default If field in forms

You shouldn't need the second drop down box at all. What you appear to need
is a conditional field (or fields) that give a result based on the content
of the first field. Thus :

{IF {Dropdown1} = "John Smith" "ARIBA"}{IF {Dropdown1} = "Jane Brown"
"ARICS" } etc

Check the 'calculate on exit' check box of Dropdown1 and when you select and
tab out of the field the appropriate result will be written to the
conditional field.

See also http://www.gmayor.com/SelectFile.htm

--

Graham Mayor - Word MVP

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


ab wrote:
I have created a form to be filled in using Word 2003. I have two
drop-down boxes which I need to link somehow.

What I want to do is:

If the name in the first drop-down box is "John Smith"

The qualification in the next drop-down box is "ARIBA"

If the name in the first drop-down box is "Jane Brown",

The qualification in the next drop-down box is "ARICS"

Help would be appreciated please.

TIA



  #3   Report Post  
Posted to microsoft.public.word.newusers
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default If field in forms

Do you want the user to be able to select an alternate qualification from
the second DropDown, or is the qualification intended to be fixed based on
the name selected in the first DropDown?

If that is not the case, it would be better to use a Text FormField for the
qualification and run a macro on exit from the Drop Down to determine the
entry that was selected and then use the .Result property of the Text
FormField to display the appropriate qualification.

If there are only a couple of entries in the DropDown list, an If field
could be used

With ActiveDocument.FormFields("Name").DropDown
If .ListEntries(.Value) = "John Smith" Then
ActiveDocument.FormFields("Qualification").Result = "ARIBA"
Else 'Jane Brown was selected
ActiveDocument.FormFields("Qualification").Result = "ARICS"
End If
End With

but if there are many more than that, then it may be better to use a Select
Case construction.



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"ab" wrote in message
...
I have created a form to be filled in using Word 2003. I have two drop-down
boxes which I need to link somehow.

What I want to do is:

If the name in the first drop-down box is "John Smith"

The qualification in the next drop-down box is "ARIBA"

If the name in the first drop-down box is "Jane Brown",

The qualification in the next drop-down box is "ARICS"

Help would be appreciated please.

TIA



  #4   Report Post  
Posted to microsoft.public.word.newusers
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default If field in forms

To add to what Graham has said, if your dropdown offers only two choices
(the two you cited), you need only one IF field, as you can compare to
either of the possibilities, and the TrueText and FalseText of that one
field will take care of both eventualities.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Graham Mayor" wrote in message
...
You shouldn't need the second drop down box at all. What you appear to

need
is a conditional field (or fields) that give a result based on the content
of the first field. Thus :

{IF {Dropdown1} = "John Smith" "ARIBA"}{IF {Dropdown1} = "Jane Brown"
"ARICS" } etc

Check the 'calculate on exit' check box of Dropdown1 and when you select

and
tab out of the field the appropriate result will be written to the
conditional field.

See also http://www.gmayor.com/SelectFile.htm

--

Graham Mayor - Word MVP

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


ab wrote:
I have created a form to be filled in using Word 2003. I have two
drop-down boxes which I need to link somehow.

What I want to do is:

If the name in the first drop-down box is "John Smith"

The qualification in the next drop-down box is "ARIBA"

If the name in the first drop-down box is "Jane Brown",

The qualification in the next drop-down box is "ARICS"

Help would be appreciated please.

TIA




  #5   Report Post  
Posted to microsoft.public.word.newusers
ab ab is offline
external usenet poster
 
Posts: 13
Default If field in forms

There are three names and three qualifications.

"Doug Robbins - Word MVP" wrote in message
...
Do you want the user to be able to select an alternate qualification from
the second DropDown, or is the qualification intended to be fixed based on
the name selected in the first DropDown?

If that is not the case, it would be better to use a Text FormField for
the qualification and run a macro on exit from the Drop Down to determine
the entry that was selected and then use the .Result property of the Text
FormField to display the appropriate qualification.

If there are only a couple of entries in the DropDown list, an If field
could be used

With ActiveDocument.FormFields("Name").DropDown
If .ListEntries(.Value) = "John Smith" Then
ActiveDocument.FormFields("Qualification").Result = "ARIBA"
Else 'Jane Brown was selected
ActiveDocument.FormFields("Qualification").Result = "ARICS"
End If
End With

but if there are many more than that, then it may be better to use a
Select Case construction.



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"ab" wrote in message
...
I have created a form to be filled in using Word 2003. I have two
drop-down boxes which I need to link somehow.

What I want to do is:

If the name in the first drop-down box is "John Smith"

The qualification in the next drop-down box is "ARIBA"

If the name in the first drop-down box is "Jane Brown",

The qualification in the next drop-down box is "ARICS"

Help would be appreciated please.

TIA







  #6   Report Post  
Posted to microsoft.public.word.newusers
ab ab is offline
external usenet poster
 
Posts: 13
Default If field in forms

Reading through, I don't think I explained it very well.

The form has a drop-down box for the three people.
Further down the form I have to enter their qualifications. One is RIBA, one
is RICS, one is ACIAT.
Depending on which of the three are required, I then put in the appropriate
qualifiication.


"ab" wrote in message
...
There are three names and three qualifications.

"Doug Robbins - Word MVP" wrote in message
...
Do you want the user to be able to select an alternate qualification from
the second DropDown, or is the qualification intended to be fixed based
on the name selected in the first DropDown?

If that is not the case, it would be better to use a Text FormField for
the qualification and run a macro on exit from the Drop Down to determine
the entry that was selected and then use the .Result property of the Text
FormField to display the appropriate qualification.

If there are only a couple of entries in the DropDown list, an If field
could be used

With ActiveDocument.FormFields("Name").DropDown
If .ListEntries(.Value) = "John Smith" Then
ActiveDocument.FormFields("Qualification").Result = "ARIBA"
Else 'Jane Brown was selected
ActiveDocument.FormFields("Qualification").Result = "ARICS"
End If
End With

but if there are many more than that, then it may be better to use a
Select Case construction.



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"ab" wrote in message
...
I have created a form to be filled in using Word 2003. I have two
drop-down boxes which I need to link somehow.

What I want to do is:

If the name in the first drop-down box is "John Smith"

The qualification in the next drop-down box is "ARIBA"

If the name in the first drop-down box is "Jane Brown",

The qualification in the next drop-down box is "ARICS"

Help would be appreciated please.

TIA







  #7   Report Post  
Posted to microsoft.public.word.newusers
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default If field in forms

With ActiveDocument.FormFields("Name").DropDown
If .ListEntries(.Value) = "John Smith" Then
ActiveDocument.FormFields("Qualification").Result = "RIBA"
ElseIf .ListEntries(.Value) = "Jane Brown" Then
ActiveDocument.FormFields("Qualification").Result = "RICS"
Else
ActiveDocument.FormFields("Qualification").Result = "ACIAT"
End If
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"ab" wrote in message
...
Reading through, I don't think I explained it very well.

The form has a drop-down box for the three people.
Further down the form I have to enter their qualifications. One is RIBA,
one is RICS, one is ACIAT.
Depending on which of the three are required, I then put in the
appropriate qualifiication.


"ab" wrote in message
...
There are three names and three qualifications.

"Doug Robbins - Word MVP" wrote in message
...
Do you want the user to be able to select an alternate qualification
from the second DropDown, or is the qualification intended to be fixed
based on the name selected in the first DropDown?

If that is not the case, it would be better to use a Text FormField for
the qualification and run a macro on exit from the Drop Down to
determine the entry that was selected and then use the .Result property
of the Text FormField to display the appropriate qualification.

If there are only a couple of entries in the DropDown list, an If field
could be used

With ActiveDocument.FormFields("Name").DropDown
If .ListEntries(.Value) = "John Smith" Then
ActiveDocument.FormFields("Qualification").Result = "ARIBA"
Else 'Jane Brown was selected
ActiveDocument.FormFields("Qualification").Result = "ARICS"
End If
End With

but if there are many more than that, then it may be better to use a
Select Case construction.



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"ab" wrote in message
...
I have created a form to be filled in using Word 2003. I have two
drop-down boxes which I need to link somehow.

What I want to do is:

If the name in the first drop-down box is "John Smith"

The qualification in the next drop-down box is "ARIBA"

If the name in the first drop-down box is "Jane Brown",

The qualification in the next drop-down box is "ARICS"

Help would be appreciated please.

TIA









  #8   Report Post  
Posted to microsoft.public.word.newusers
ab ab is offline
external usenet poster
 
Posts: 18
Default If field in forms

Sorry but I don't think I've got the hang of this.

The drop-down box with the names works fine - I have that in the template.

When I go to the box lower down the page where I want the qualification, I
can't get this right. I have tried creating a new macro with the details
(amended with the correct names, etc) but when I try to run it, I get "run
time error 438, Object does not support this property".

If I try to do an If field, I am not sure how to enter the info.

Thanks for your help.


"Doug Robbins - Word MVP" wrote in message
...
With ActiveDocument.FormFields("Name").DropDown
If .ListEntries(.Value) = "John Smith" Then
ActiveDocument.FormFields("Qualification").Result = "RIBA"
ElseIf .ListEntries(.Value) = "Jane Brown" Then
ActiveDocument.FormFields("Qualification").Result = "RICS"
Else
ActiveDocument.FormFields("Qualification").Result = "ACIAT"
End If
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"ab" wrote in message
...
Reading through, I don't think I explained it very well.

The form has a drop-down box for the three people.
Further down the form I have to enter their qualifications. One is RIBA,
one is RICS, one is ACIAT.
Depending on which of the three are required, I then put in the
appropriate qualifiication.


"ab" wrote in message
...
There are three names and three qualifications.

"Doug Robbins - Word MVP" wrote in message
...
Do you want the user to be able to select an alternate qualification
from the second DropDown, or is the qualification intended to be fixed
based on the name selected in the first DropDown?

If that is not the case, it would be better to use a Text FormField for
the qualification and run a macro on exit from the Drop Down to
determine the entry that was selected and then use the .Result property
of the Text FormField to display the appropriate qualification.

If there are only a couple of entries in the DropDown list, an If field
could be used

With ActiveDocument.FormFields("Name").DropDown
If .ListEntries(.Value) = "John Smith" Then
ActiveDocument.FormFields("Qualification").Result = "ARIBA"
Else 'Jane Brown was selected
ActiveDocument.FormFields("Qualification").Result = "ARICS"
End If
End With

but if there are many more than that, then it may be better to use a
Select Case construction.



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"ab" wrote in message
...
I have created a form to be filled in using Word 2003. I have two
drop-down boxes which I need to link somehow.

What I want to do is:

If the name in the first drop-down box is "John Smith"

The qualification in the next drop-down box is "ARIBA"

If the name in the first drop-down box is "Jane Brown",

The qualification in the next drop-down box is "ARICS"

Help would be appreciated please.

TIA











  #9   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default If field in forms

The conditional (IF) field certainly works (provided you tab out of the
field). You insert the field boundary pairs in place of the second drop-down
form field with CTRL +F9 and insert the information to match that in my
earlier post. You can get the bookmark name of the drop down field by double
clicking with the form unlocked and use it in pace of Dropdown1 in the
example.

--

Graham Mayor - Word MVP

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



ab wrote:
Sorry but I don't think I've got the hang of this.

The drop-down box with the names works fine - I have that in the
template.
When I go to the box lower down the page where I want the
qualification, I can't get this right. I have tried creating a new
macro with the details (amended with the correct names, etc) but when
I try to run it, I get "run time error 438, Object does not support
this property".
If I try to do an If field, I am not sure how to enter the info.

Thanks for your help.


"Doug Robbins - Word MVP" wrote in message
...
With ActiveDocument.FormFields("Name").DropDown
If .ListEntries(.Value) = "John Smith" Then
ActiveDocument.FormFields("Qualification").Result = "RIBA"
ElseIf .ListEntries(.Value) = "Jane Brown" Then
ActiveDocument.FormFields("Qualification").Result = "RICS"
Else
ActiveDocument.FormFields("Qualification").Result = "ACIAT"
End If
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"ab" wrote in message
...
Reading through, I don't think I explained it very well.

The form has a drop-down box for the three people.
Further down the form I have to enter their qualifications. One is
RIBA, one is RICS, one is ACIAT.
Depending on which of the three are required, I then put in the
appropriate qualifiication.


"ab" wrote in message
...
There are three names and three qualifications.

"Doug Robbins - Word MVP" wrote in message
...
Do you want the user to be able to select an alternate
qualification from the second DropDown, or is the qualification
intended to be fixed based on the name selected in the first
DropDown? If that is not the case, it would be better to use a Text
FormField for the qualification and run a macro on exit from the
Drop Down to determine the entry that was selected and then use
the .Result property of the Text FormField to display the
appropriate qualification. If there are only a couple of entries in
the DropDown list, an If
field could be used

With ActiveDocument.FormFields("Name").DropDown
If .ListEntries(.Value) = "John Smith" Then
ActiveDocument.FormFields("Qualification").Result = "ARIBA"
Else 'Jane Brown was selected
ActiveDocument.FormFields("Qualification").Result = "ARICS"
End If
End With

but if there are many more than that, then it may be better to
use a Select Case construction.



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself
of my services on a paid consulting basis.

Doug Robbins - Word MVP

"ab" wrote in message
...
I have created a form to be filled in using Word 2003. I have two
drop-down boxes which I need to link somehow.

What I want to do is:

If the name in the first drop-down box is "John Smith"

The qualification in the next drop-down box is "ARIBA"

If the name in the first drop-down box is "Jane Brown",

The qualification in the next drop-down box is "ARICS"

Help would be appreciated please.

TIA



  #10   Report Post  
Posted to microsoft.public.word.newusers
ab ab is offline
external usenet poster
 
Posts: 18
Default If field in forms

Sorry to be a nuisance - I have been experimenting with the different advice
given and now appear to have got the fields OK with the drop-down box and
the If field in the qualification box.

Next problem: when I protect the template and save it, on opening a new
document I have to unprotect it to get the drop-down box to work and then
protect it again to be able to type on the rest of the form which is one
page laid out in two columns.
What am I missing here, please?

"ab" wrote in message
...
Sorry but I don't think I've got the hang of this.

The drop-down box with the names works fine - I have that in the template.

When I go to the box lower down the page where I want the qualification, I
can't get this right. I have tried creating a new macro with the details
(amended with the correct names, etc) but when I try to run it, I get "run
time error 438, Object does not support this property".

If I try to do an If field, I am not sure how to enter the info.

Thanks for your help.


"Doug Robbins - Word MVP" wrote in message
...
With ActiveDocument.FormFields("Name").DropDown
If .ListEntries(.Value) = "John Smith" Then
ActiveDocument.FormFields("Qualification").Result = "RIBA"
ElseIf .ListEntries(.Value) = "Jane Brown" Then
ActiveDocument.FormFields("Qualification").Result = "RICS"
Else
ActiveDocument.FormFields("Qualification").Result = "ACIAT"
End If
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"ab" wrote in message
...
Reading through, I don't think I explained it very well.

The form has a drop-down box for the three people.
Further down the form I have to enter their qualifications. One is RIBA,
one is RICS, one is ACIAT.
Depending on which of the three are required, I then put in the
appropriate qualifiication.


"ab" wrote in message
...
There are three names and three qualifications.

"Doug Robbins - Word MVP" wrote in message
...
Do you want the user to be able to select an alternate qualification
from the second DropDown, or is the qualification intended to be fixed
based on the name selected in the first DropDown?

If that is not the case, it would be better to use a Text FormField
for the qualification and run a macro on exit from the Drop Down to
determine the entry that was selected and then use the .Result
property of the Text FormField to display the appropriate
qualification.

If there are only a couple of entries in the DropDown list, an If
field could be used

With ActiveDocument.FormFields("Name").DropDown
If .ListEntries(.Value) = "John Smith" Then
ActiveDocument.FormFields("Qualification").Result = "ARIBA"
Else 'Jane Brown was selected
ActiveDocument.FormFields("Qualification").Result = "ARICS"
End If
End With

but if there are many more than that, then it may be better to use a
Select Case construction.



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"ab" wrote in message
...
I have created a form to be filled in using Word 2003. I have two
drop-down boxes which I need to link somehow.

What I want to do is:

If the name in the first drop-down box is "John Smith"

The qualification in the next drop-down box is "ARIBA"

If the name in the first drop-down box is "Jane Brown",

The qualification in the next drop-down box is "ARICS"

Help would be appreciated please.

TIA















  #11   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default If field in forms

It depends on whose advice you are following
If mine, you only need 1 drop down field. The calculate on exit property of
that field must be checked.
Lock the form. The conditional (IF) field is updated from the choice in the
dropdown field.

--

Graham Mayor - Word MVP

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


ab wrote:
Sorry to be a nuisance - I have been experimenting with the different
advice given and now appear to have got the fields OK with the
drop-down box and the If field in the qualification box.

Next problem: when I protect the template and save it, on opening a
new document I have to unprotect it to get the drop-down box to work
and then protect it again to be able to type on the rest of the form
which is one page laid out in two columns.
What am I missing here, please?

"ab" wrote in message
...
Sorry but I don't think I've got the hang of this.

The drop-down box with the names works fine - I have that in the
template. When I go to the box lower down the page where I want the
qualification, I can't get this right. I have tried creating a new
macro with the details (amended with the correct names, etc) but
when I try to run it, I get "run time error 438, Object does not
support this property". If I try to do an If field, I am not sure how to
enter the info.

Thanks for your help.


"Doug Robbins - Word MVP" wrote in message
...
With ActiveDocument.FormFields("Name").DropDown
If .ListEntries(.Value) = "John Smith" Then
ActiveDocument.FormFields("Qualification").Result = "RIBA"
ElseIf .ListEntries(.Value) = "Jane Brown" Then
ActiveDocument.FormFields("Qualification").Result = "RICS"
Else
ActiveDocument.FormFields("Qualification").Result = "ACIAT"
End If
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of
my services on a paid consulting basis.

Doug Robbins - Word MVP

"ab" wrote in message
...
Reading through, I don't think I explained it very well.

The form has a drop-down box for the three people.
Further down the form I have to enter their qualifications. One is
RIBA, one is RICS, one is ACIAT.
Depending on which of the three are required, I then put in the
appropriate qualifiication.


"ab" wrote in message
...
There are three names and three qualifications.

"Doug Robbins - Word MVP" wrote in
message ...
Do you want the user to be able to select an alternate
qualification from the second DropDown, or is the qualification
intended to be fixed based on the name selected in the first
DropDown? If that is not the case, it would be better to use a Text
FormField for the qualification and run a macro on exit from the
Drop Down to determine the entry that was selected and then use
the .Result property of the Text FormField to display the
appropriate qualification.

If there are only a couple of entries in the DropDown list, an If
field could be used

With ActiveDocument.FormFields("Name").DropDown
If .ListEntries(.Value) = "John Smith" Then
ActiveDocument.FormFields("Qualification").Result =
"ARIBA" Else 'Jane Brown was selected
ActiveDocument.FormFields("Qualification").Result =
"ARICS" End If
End With

but if there are many more than that, then it may be better to
use a Select Case construction.



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself
of my services on a paid consulting basis.

Doug Robbins - Word MVP

"ab" wrote in message
...
I have created a form to be filled in using Word 2003. I have
two drop-down boxes which I need to link somehow.

What I want to do is:

If the name in the first drop-down box is "John Smith"

The qualification in the next drop-down box is "ARIBA"

If the name in the first drop-down box is "Jane Brown",

The qualification in the next drop-down box is "ARICS"

Help would be appreciated please.

TIA



  #12   Report Post  
Posted to microsoft.public.word.newusers
ab ab is offline
external usenet poster
 
Posts: 13
Default If field in forms

Thanks Graham, that seems to be working for me now. I just have the problem
with the protect/unprotect bit (i.e. when I protect the template and save
it, on opening a new document I have to unprotect it to get the drop-down
box to work and then protect it again to be able to type on the rest of the
form which is one page laid out in two columns.
Can you help, please?


"Graham Mayor" wrote in message
...
It depends on whose advice you are following
If mine, you only need 1 drop down field. The calculate on exit property
of that field must be checked.
Lock the form. The conditional (IF) field is updated from the choice in
the dropdown field.

--

Graham Mayor - Word MVP

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


ab wrote:
Sorry to be a nuisance - I have been experimenting with the different
advice given and now appear to have got the fields OK with the
drop-down box and the If field in the qualification box.

Next problem: when I protect the template and save it, on opening a
new document I have to unprotect it to get the drop-down box to work
and then protect it again to be able to type on the rest of the form
which is one page laid out in two columns.
What am I missing here, please?

"ab" wrote in message
...
Sorry but I don't think I've got the hang of this.

The drop-down box with the names works fine - I have that in the
template. When I go to the box lower down the page where I want the
qualification, I can't get this right. I have tried creating a new
macro with the details (amended with the correct names, etc) but
when I try to run it, I get "run time error 438, Object does not
support this property". If I try to do an If field, I am not sure how to
enter the info.

Thanks for your help.


"Doug Robbins - Word MVP" wrote in message
...
With ActiveDocument.FormFields("Name").DropDown
If .ListEntries(.Value) = "John Smith" Then
ActiveDocument.FormFields("Qualification").Result = "RIBA"
ElseIf .ListEntries(.Value) = "Jane Brown" Then
ActiveDocument.FormFields("Qualification").Result = "RICS"
Else
ActiveDocument.FormFields("Qualification").Result = "ACIAT"
End If
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of
my services on a paid consulting basis.

Doug Robbins - Word MVP

"ab" wrote in message
...
Reading through, I don't think I explained it very well.

The form has a drop-down box for the three people.
Further down the form I have to enter their qualifications. One is
RIBA, one is RICS, one is ACIAT.
Depending on which of the three are required, I then put in the
appropriate qualifiication.


"ab" wrote in message
...
There are three names and three qualifications.

"Doug Robbins - Word MVP" wrote in
message ...
Do you want the user to be able to select an alternate
qualification from the second DropDown, or is the qualification
intended to be fixed based on the name selected in the first
DropDown? If that is not the case, it would be better to use a Text
FormField for the qualification and run a macro on exit from the
Drop Down to determine the entry that was selected and then use
the .Result property of the Text FormField to display the
appropriate qualification.

If there are only a couple of entries in the DropDown list, an If
field could be used

With ActiveDocument.FormFields("Name").DropDown
If .ListEntries(.Value) = "John Smith" Then
ActiveDocument.FormFields("Qualification").Result =
"ARIBA" Else 'Jane Brown was selected
ActiveDocument.FormFields("Qualification").Result =
"ARICS" End If
End With

but if there are many more than that, then it may be better to
use a Select Case construction.



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself
of my services on a paid consulting basis.

Doug Robbins - Word MVP

"ab" wrote in message
...
I have created a form to be filled in using Word 2003. I have
two drop-down boxes which I need to link somehow.

What I want to do is:

If the name in the first drop-down box is "John Smith"

The qualification in the next drop-down box is "ARIBA"

If the name in the first drop-down box is "Jane Brown",

The qualification in the next drop-down box is "ARICS"

Help would be appreciated please.

TIA





  #13   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default If field in forms

Insert a section and protect only the section that contains your form
fields, though really you would do better to investigate autotext for the
insertion of your variable data or better still userforms to gather the data
and place it
Word MVP FAQ - Userforms
http://word.mvps.org/FAQs/Userforms.htm

see also http://www.gmayor.com/Macrobutton.htm

--

Graham Mayor - Word MVP

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



ab wrote:
Thanks Graham, that seems to be working for me now. I just have the
problem with the protect/unprotect bit (i.e. when I protect the
template and save it, on opening a new document I have to unprotect
it to get the drop-down box to work and then protect it again to be
able to type on the rest of the form which is one page laid out in
two columns. Can you help, please?


"Graham Mayor" wrote in message
...
It depends on whose advice you are following
If mine, you only need 1 drop down field. The calculate on exit
property of that field must be checked.
Lock the form. The conditional (IF) field is updated from the choice
in the dropdown field.

--

Graham Mayor - Word MVP

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


ab wrote:
Sorry to be a nuisance - I have been experimenting with the
different advice given and now appear to have got the fields OK
with the drop-down box and the If field in the qualification box.

Next problem: when I protect the template and save it, on opening a
new document I have to unprotect it to get the drop-down box to work
and then protect it again to be able to type on the rest of the form
which is one page laid out in two columns.
What am I missing here, please?

"ab" wrote in message
...
Sorry but I don't think I've got the hang of this.

The drop-down box with the names works fine - I have that in the
template. When I go to the box lower down the page where I want the
qualification, I can't get this right. I have tried creating a new
macro with the details (amended with the correct names, etc) but
when I try to run it, I get "run time error 438, Object does not
support this property". If I try to do an If field, I am not sure
how to enter the info.

Thanks for your help.


"Doug Robbins - Word MVP" wrote in message
...
With ActiveDocument.FormFields("Name").DropDown
If .ListEntries(.Value) = "John Smith" Then
ActiveDocument.FormFields("Qualification").Result = "RIBA"
ElseIf .ListEntries(.Value) = "Jane Brown" Then
ActiveDocument.FormFields("Qualification").Result = "RICS"
Else
ActiveDocument.FormFields("Qualification").Result = "ACIAT"
End If
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of
my services on a paid consulting basis.

Doug Robbins - Word MVP

"ab" wrote in message
...
Reading through, I don't think I explained it very well.

The form has a drop-down box for the three people.
Further down the form I have to enter their qualifications. One
is RIBA, one is RICS, one is ACIAT.
Depending on which of the three are required, I then put in the
appropriate qualifiication.


"ab" wrote in message
...
There are three names and three qualifications.

"Doug Robbins - Word MVP" wrote in
message ...
Do you want the user to be able to select an alternate
qualification from the second DropDown, or is the qualification
intended to be fixed based on the name selected in the first
DropDown? If that is not the case, it would be better to use a
Text FormField for the qualification and run a macro on exit
from the Drop Down to determine the entry that was selected
and then use the .Result property of the Text FormField to
display the appropriate qualification.

If there are only a couple of entries in the DropDown list, an
If field could be used

With ActiveDocument.FormFields("Name").DropDown
If .ListEntries(.Value) = "John Smith" Then
ActiveDocument.FormFields("Qualification").Result =
"ARIBA" Else 'Jane Brown was selected
ActiveDocument.FormFields("Qualification").Result =
"ARICS" End If
End With

but if there are many more than that, then it may be better to
use a Select Case construction.



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself
of my services on a paid consulting basis.

Doug Robbins - Word MVP

"ab" wrote in message
...
I have created a form to be filled in using Word 2003. I have
two drop-down boxes which I need to link somehow.

What I want to do is:

If the name in the first drop-down box is "John Smith"

The qualification in the next drop-down box is "ARIBA"

If the name in the first drop-down box is "Jane Brown",

The qualification in the next drop-down box is "ARICS"

Help would be appreciated please.

TIA



  #14   Report Post  
Posted to microsoft.public.word.newusers
ab ab is offline
external usenet poster
 
Posts: 18
Default If field in forms

I will look into that - I have never used autotext for inserting variable
data or used userforms.
"Graham Mayor" wrote in message
...
Insert a section and protect only the section that contains your form
fields, though really you would do better to investigate autotext for the
insertion of your variable data or better still userforms to gather the
data and place it
Word MVP FAQ - Userforms
http://word.mvps.org/FAQs/Userforms.htm

see also http://www.gmayor.com/Macrobutton.htm

--

Graham Mayor - Word MVP

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



ab wrote:
Thanks Graham, that seems to be working for me now. I just have the
problem with the protect/unprotect bit (i.e. when I protect the
template and save it, on opening a new document I have to unprotect
it to get the drop-down box to work and then protect it again to be
able to type on the rest of the form which is one page laid out in
two columns. Can you help, please?


"Graham Mayor" wrote in message
...
It depends on whose advice you are following
If mine, you only need 1 drop down field. The calculate on exit
property of that field must be checked.
Lock the form. The conditional (IF) field is updated from the choice
in the dropdown field.

--

Graham Mayor - Word MVP

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


ab wrote:
Sorry to be a nuisance - I have been experimenting with the
different advice given and now appear to have got the fields OK
with the drop-down box and the If field in the qualification box.

Next problem: when I protect the template and save it, on opening a
new document I have to unprotect it to get the drop-down box to work
and then protect it again to be able to type on the rest of the form
which is one page laid out in two columns.
What am I missing here, please?

"ab" wrote in message
...
Sorry but I don't think I've got the hang of this.

The drop-down box with the names works fine - I have that in the
template. When I go to the box lower down the page where I want the
qualification, I can't get this right. I have tried creating a new
macro with the details (amended with the correct names, etc) but
when I try to run it, I get "run time error 438, Object does not
support this property". If I try to do an If field, I am not sure
how to enter the info.

Thanks for your help.


"Doug Robbins - Word MVP" wrote in message
...
With ActiveDocument.FormFields("Name").DropDown
If .ListEntries(.Value) = "John Smith" Then
ActiveDocument.FormFields("Qualification").Result = "RIBA"
ElseIf .ListEntries(.Value) = "Jane Brown" Then
ActiveDocument.FormFields("Qualification").Result = "RICS"
Else
ActiveDocument.FormFields("Qualification").Result = "ACIAT"
End If
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of
my services on a paid consulting basis.

Doug Robbins - Word MVP

"ab" wrote in message
...
Reading through, I don't think I explained it very well.

The form has a drop-down box for the three people.
Further down the form I have to enter their qualifications. One
is RIBA, one is RICS, one is ACIAT.
Depending on which of the three are required, I then put in the
appropriate qualifiication.


"ab" wrote in message
...
There are three names and three qualifications.

"Doug Robbins - Word MVP" wrote in
message ...
Do you want the user to be able to select an alternate
qualification from the second DropDown, or is the qualification
intended to be fixed based on the name selected in the first
DropDown? If that is not the case, it would be better to use a
Text FormField for the qualification and run a macro on exit
from the Drop Down to determine the entry that was selected
and then use the .Result property of the Text FormField to
display the appropriate qualification.

If there are only a couple of entries in the DropDown list, an
If field could be used

With ActiveDocument.FormFields("Name").DropDown
If .ListEntries(.Value) = "John Smith" Then
ActiveDocument.FormFields("Qualification").Result =
"ARIBA" Else 'Jane Brown was selected
ActiveDocument.FormFields("Qualification").Result =
"ARICS" End If
End With

but if there are many more than that, then it may be better to
use a Select Case construction.



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself
of my services on a paid consulting basis.

Doug Robbins - Word MVP

"ab" wrote in message
...
I have created a form to be filled in using Word 2003. I have
two drop-down boxes which I need to link somehow.

What I want to do is:

If the name in the first drop-down box is "John Smith"

The qualification in the next drop-down box is "ARIBA"

If the name in the first drop-down box is "Jane Brown",

The qualification in the next drop-down box is "ARICS"

Help would be appreciated please.

TIA





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
Field codes not updating SueK Microsoft Word Help 8 June 20th 06 02:59 PM
Forms in Word don't send the field information...How do I fix? ridergroov Microsoft Word Help 2 January 10th 06 07:15 PM
printing forms - no answer in field dpjjeanie Microsoft Word Help 0 July 16th 05 09:35 PM
Compile/Analyze Word Form Field data from multiple forms? Dave Peterson Microsoft Word Help 2 July 14th 05 02:54 AM


All times are GMT +1. The time now is 11:34 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"