If you want to require users to enter a value into a control (control: A graphical user interface object, such as a text box, check box, scroll bar, or command button, that lets users control the program. You use controls to display data or choices, perform an action, or make the user interface easier to read.), you must
make the control's field (field: An element or attribute in the data source that can contain data. If the field is an element, it can contain attribute fields. Fields store the data that is entered into controls.) required. Depending on how
you want to display error alerts and the flexibility of your form, you
can make the field required by
displaying either a standard error message (a red asterisk or dashed red border and a ScreenTip that says "Cannot be blank") or a custom error message.
Note If
your form prevents you from selecting the
Cannot be blank check box in the Control Properties dialog box, you will need to
display a custom error message.
Display a standard error message
when
a control is left blank
- In design mode, double-click the control whose field you
want to make required.
- On the Data tab in the
Control Properties dialog box, select the
Cannot be blank
check box.
Display a custom error message when
a control is left blank
- In design mode, select the control whose field you want to make required, and then click
Data Validation on the
Format menu.
- In the
Data Validation dialog box, click
Add.
- In the first box under
If this condition is true,
select the control's field.
- In the second box, click
is blank.
- In the
Error alert type box, click the type
of error alert you want to display to users.
- In the ScreenTip box, type the text you want to display when a user points to the control or right-clicks the control.
- In the Message box, type the text you want to display in the dialog box either immediately (if you chose a dialog box alert) or when the user requests more details (if you chose an inline alert).
Note The information in this topic may not apply if you are working with a form designed using Microsoft Office InfoPath 2003 without the service pack installed.