Conditional Cross Ref.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am working on a form that uses form fields. That I want to use
conditional cross reference s and I'm not sure how to do it? I

Example I have three fields

Ename text form field
Echeck form check box
Name text text form field

If Echeck is checked I want Name to contain the value of Ename, if it is
not checked then I want it to be a reqular form field where I can type
informatiion in.

Any ideas

Thanks

Fr. Robert
 
Fr. Robert said:
I am working on a form that uses form fields. That I want to use
conditional cross reference s and I'm not sure how to do it? I

Example I have three fields

Ename text form field
Echeck form check box
Name text text form field

If Echeck is checked I want Name to contain the value of Ename, if
it is not checked then I want it to be a reqular form field where
I can type informatiion in.

Any ideas

Thanks

Fr. Robert

Using the instructions at http://www.gmayor.com/installing_macro.htm, add
this macro to the form's template. Then open the Properties dialog of the
checkbox and select the macro in the Exit dropdown.

Sub ExitECheck()
With ActiveDocument.FormFields
If .Item("ECheck").CheckBox.Value Then
.Item("Name").Result = .Item("EName").Result
.Item("Name").Enabled = False
Else
With .Item("Name")
.Result = ""
.Enabled = True
End With
End If
End With
End Sub

If you use different names for the form fields, the same changes are needed
in the macro.

If you edit the entry in EName while ECheck is checked, the value in Name
won't be updated until you enter and then exit ECheck (which fires the
macro).
 
I thought something along the line of:
{ IF Check1 = True "{ FORMTEXT }" "{ REF Ename }" }
would work, but I can't figure out the value to check for so you may need to
use Jay's macro.
--

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
Back
Top