template

R

rob p

I have a template in Word 2000. It has text form fields set in different
cells in a table. Can I program a text field (upon exiting - and filling a
requirement) to either suppress or show the text in a cell below it?

If input in text field is = "123" then show what is in the cell below. If
input is not "123" then suppress the text. See 2 cell table below.

text field input "here..."
___________________
"SUPPRESS OR NOT"
___________________
 
C

Charles Kenyon

Yes, either by using an IF field for the suppression contents or using an
on-exit macro. The IF field is not practical if you want the second cell to
not exist but works if you just want text to display or not. You need the
properties of your source field to require it to "calculate on exit." The
following assumes that the bookmark for your source field is "Text1."

{ IF "{ Ref "Text1" }" = "123" "My display text" }

The delimeters {} have to be inserted in pairs using the Ctrl-F9 key.

I'm not even going to attempt the vba for an on-exit macro. It is too
particular to your situation and would require unprotecting and reprotecting
your form. What you are talking about is what Word calls an "online form."
For more about online forms, follow the links at
http://addbalance.com/word/wordwebresources.htm#Forms or
http://word.mvps.org/FAQs/Customization/FillinTheBlanks.htm especially Dian
Chapman's series of articles. You can find information about
protecting/unprotecting and on-exit macros there.

Hope this helps,
 

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