Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
djhowes djhowes is offline
external usenet poster
 
Posts: 2
Default Form Fields - Case Statement or Something Simpler?

I'm designing a Word form containing a table, which when Protected will
enable users to enter numbers in some fields, and which auto calculates
values in other cells.

I have one cell that contains a calculated form field that produces a
numerical value in the range 6-24 based on adding values in other cells; I
have given this field the Bookmark name of Perf.

In an adjacent cell I want the form to enter different text strings
dependent on the value of the Perf cell. How do I achieve this? I have
tried using IF expressions to no avail - regardless of the value of Perf I
always get the first text string.

To take this a stage further, I have another adjacent cell that contains a
drop down list field with various text values (Bookmarked as NCAPerf), the
first option of which is "N/A" (for not applicable). How do I modify the
answer to the first question such that if the value of NCAPerf is anything
other than "N/A" then the different text strings referred to above are
displayed, but that if "N/A" has been selected, then the cell displays an
empty text string ("")?

I am using Word 2003.
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Form Fields - Case Statement or Something Simpler?

You would need to use a macro to accomplish what you are after, probably run
on exit from the dropdown form field. It would use a VBA If,,End if
constuction the check the item selected in the dropdown form field and then
set the .Result of a formfield in the cell adjacent to Perf to either
nothing, or some text that would be based the use of a Select Case
construction that uses the .Result of the Perf form field.

--
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

"djhowes" wrote in message
...
I'm designing a Word form containing a table, which when Protected will
enable users to enter numbers in some fields, and which auto calculates
values in other cells.

I have one cell that contains a calculated form field that produces a
numerical value in the range 6-24 based on adding values in other cells; I
have given this field the Bookmark name of Perf.

In an adjacent cell I want the form to enter different text strings
dependent on the value of the Perf cell. How do I achieve this? I have
tried using IF expressions to no avail - regardless of the value of Perf I
always get the first text string.

To take this a stage further, I have another adjacent cell that contains a
drop down list field with various text values (Bookmarked as NCAPerf), the
first option of which is "N/A" (for not applicable). How do I modify the
answer to the first question such that if the value of NCAPerf is anything
other than "N/A" then the different text strings referred to above are
displayed, but that if "N/A" has been selected, then the cell displays an
empty text string ("")?

I am using Word 2003.



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
djhowes djhowes is offline
external usenet poster
 
Posts: 2
Default Form Fields - Case Statement or Something Simpler?

Doug

Thanks for your reply. Whilst I understand the gist of your answer,
unfortunately I have no VBA experience and so I have no idea how to
write/construct what you describe.

Also the field in question must display from its choice of text strings
until the NCAPerf field is set to N/A, ie the choice of text other than N/A
that the user selects will be related to his assessment of the text string
statement displayed, based on the Perf value.

"Doug Robbins - Word MVP" wrote:

You would need to use a macro to accomplish what you are after, probably run
on exit from the dropdown form field. It would use a VBA If,,End if
constuction the check the item selected in the dropdown form field and then
set the .Result of a formfield in the cell adjacent to Perf to either
nothing, or some text that would be based the use of a Select Case
construction that uses the .Result of the Perf form field.

--
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

"djhowes" wrote in message
...
I'm designing a Word form containing a table, which when Protected will
enable users to enter numbers in some fields, and which auto calculates
values in other cells.

I have one cell that contains a calculated form field that produces a
numerical value in the range 6-24 based on adding values in other cells; I
have given this field the Bookmark name of Perf.

In an adjacent cell I want the form to enter different text strings
dependent on the value of the Perf cell. How do I achieve this? I have
tried using IF expressions to no avail - regardless of the value of Perf I
always get the first text string.

To take this a stage further, I have another adjacent cell that contains a
drop down list field with various text values (Bookmarked as NCAPerf), the
first option of which is "N/A" (for not applicable). How do I modify the
answer to the first question such that if the value of NCAPerf is anything
other than "N/A" then the different text strings referred to above are
displayed, but that if "N/A" has been selected, then the cell displays an
empty text string ("")?

I am using Word 2003.




  #4   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Form Fields - Case Statement or Something Simpler?

Hi djhowes,

I believe you can solve the problem with a set of nested fields coded as:
{IF{NCAPerf} "N/A" "{IF{Perf}= 1 "Perf = 1"}{IF{Perf}= 2 "Perf = 2"}{IF{Perf}= 3 "Perf = 3"} €¦ {IF{Perf}= 24 "Perf = 24"}"}
where "Perf = #" represents the string for the specified Perf value and both the fields that generate the Perf bookmark and the
dropdown field that generates the NCAPerf bookmark have their properties set to 'calculate on exit. No macros required.

Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste
them from this message.

--
Cheers
macropod
[MVP - Microsoft Word]


"djhowes" wrote in message ...
I'm designing a Word form containing a table, which when Protected will
enable users to enter numbers in some fields, and which auto calculates
values in other cells.

I have one cell that contains a calculated form field that produces a
numerical value in the range 6-24 based on adding values in other cells; I
have given this field the Bookmark name of Perf.

In an adjacent cell I want the form to enter different text strings
dependent on the value of the Perf cell. How do I achieve this? I have
tried using IF expressions to no avail - regardless of the value of Perf I
always get the first text string.

To take this a stage further, I have another adjacent cell that contains a
drop down list field with various text values (Bookmarked as NCAPerf), the
first option of which is "N/A" (for not applicable). How do I modify the
answer to the first question such that if the value of NCAPerf is anything
other than "N/A" then the different text strings referred to above are
displayed, but that if "N/A" has been selected, then the cell displays an
empty text string ("")?

I am using Word 2003.


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
Can't find short cut for changing case ... upper case .... lower case JERRY[_2_] New Users 7 August 23rd 07 05:29 PM
MS Word 2003 Case statement code [email protected] Microsoft Word Help 4 December 28th 06 05:18 PM
Underlining - Is there a simpler way? anon New Users 2 June 16th 06 11:13 PM
Formatting Mail Merge Fields - Change Case to Title Case Mr user Mailmerge 1 June 10th 05 08:37 AM
Using form text fields included in an IF Statement with autotext Steve Microsoft Word Help 7 April 8th 05 08:17 AM


All times are GMT +1. The time now is 04:02 AM.

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"