"IF" Form Fields

O

OldSalt

I want to add a IF Form Field to a form. I would like
the criteria to be whether or not a checkbox is checked,
if checked, I would like the result to be the USERID...
will this work in Word if it will what would the field
coding look like?
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

There is no "IF" formfield, however if you run the following macro on exit
from the Check1 checkbox, it will populate the Text1 textbox formfield with
the username

If ActiveDocument.FormFields("Check1").CheckBox.Value = True Then
ActiveDocument.FormFields("Text1").Result = Application.UserName
Else
ActiveDocument.FormFields("Text1").Result = ""
End If


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 

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