Conditional Cross Ref.

F

Fr. Robert

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
 
J

Jay Freedman

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).
 
C

Charles Kenyon

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.
 

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