Using control values within IF field

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

Guest

Hello,

I'm using Word2003 and I would like to use the result from a check box (i.e.
True or False) in an IF field/function, but don't know how to.
I've gone as far as typing the following, which doesn't work:
IF (Checkbox(Customer).value=true,YES,NO)
I would also like the field to update automatically when the check box value
changes.
Any suggestions would be greatly appreciated !

thanks in advance
 
Olivier,

I think your only option is an on exit macro to evaluate the checkbox
state. You and then set the value of another formfield or set a
docVariable to use in an IF field. Here is a bit of code to get you
started:
Sub EvaluateCB()
With ActiveDocument
If .FormFields("Check1").Result = True Then
.FormFields("Text1").Result = "Yes"
Else
.FormFields("Text1").Result = "No"
End If
End With
End Sub
 
Back
Top