You need to set it to NOT required by default and then use Custom Data Validation to set it to required under the conditions you specify.

Signature
Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com
Bear with me because I am a beginner but it is not working. So Field 5 is my
file attchment control. I go into Properties, Data, Rules. Set Condition to
Field 5is blank, the Action is Show a Dialog Box: "You must attach a file".
When I test the form, there is no warning or message that comes up when I try
to save it.
Thank you!
> You need to set it to NOT required by default and then use Custom Data Validation to set it to required under the conditions you specify.
>
> I am trying to require file attachments under certain conditions (field 1 is
> A, and field 2 is B or C). How do I do this? The file attachment is in a
> repeating section, that's within a section that hides under certain
> conditions. Thx!
Greg Collins [InfoPath MVP] - 06 Apr 2006 17:46 GMT
Remove the rule you created, then double-click the attachment control in the view. In the properties dialog box, select the check box labeled Cannot Be Blank.

Signature
Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com
Bear with me because I am a beginner but it is not working. So Field 5 is my
file attchment control. I go into Properties, Data, Rules. Set Condition to
Field 5is blank, the Action is Show a Dialog Box: "You must attach a file".
When I test the form, there is no warning or message that comes up when I try
to save it.
Thank you!
"Greg Collins [InfoPath MVP]" wrote:
> You need to set it to NOT required by default and then use Custom Data Validation to set it to required under the conditions you specify.