Protected Form and IF Statement - Head Spinning!

D

David A Wood

Hi & thanks for any help forthcoming..

I have a Word 2003 document in "protected forms" mode.
I have a dropdown field bookmarked as "decisiondropdown" with two text
choices;
"do"
"do not"
Later in the doc, I have inserted an IF statement as follows;
{IF decisiondropdown = "do" "do not" "do"}
But regardless of the choice selected in the dropdown - I only return "do".

Have I made a stupid error here? Or is it to do with the "protected" way the
form works?
 
G

Graham Mayor

The correct syntax for a conditional field would be

{ IF{ DecisionDropdown } = "Do" "Do Not "Do" }
or
{ IF{ Ref DecisionDropdown } = "Do" "Do Not "Do" }

and you would need to check the calculate on exit check box of the dropdown
field to update the conditional field. Note that = "Do" is case sensitive so
must match *exactly* what you have in your dropdown field.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
M

macropod

Hi David ,

Since your DecisionDropdown formfield has the choices: "do" and "do not", all you need is:
{ Ref DecisionDropdown }
and to make sure the 'calculate on exit' option is set on the DecisionDropdown formfield.
 
G

Graham Mayor

That was my frst thought, but the conditional field gives the *opposite*
result of the test field?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Graham Mayor

That'll work ;)

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
D

David A Wood

Hi Graham & Macropod

Fantastic - thats working fine..
I had forgotten why I chose a career in Desktop Support & Helpdesk rather
than writing/understanding syntax or code - its because I simply cannot do
it!!

Thanks to you both - much appreciated.

Regards

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top