Microsoft Office Online
Sign in to My Office Online (What's this?) | Sign in

 
 
Microsoft Office InfoPath
Search
Search
 
Check for updates: (c) Microsoft
Office downloads
 
 
 
Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.

Email this linkEmail this link Printer-Friendly VersionPrinter-Friendly Version Bookmark and ShareShare
Make a control required
 

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.

ShowDisplay a standard error message when a control is left blank

  1. In design mode, double-click the control whose field you want to make required.
  2. On the Data tab in the Control Properties dialog box, select the Cannot be blank check box.

ShowDisplay a custom error message when a control is left blank

  1. In design mode, select the control whose field you want to make required, and then click Data Validation on the Format menu.
  2. In the Data Validation dialog box, click Add.
  3. In the first box under If this condition is true, select the control's field.
  4. In the second box, click is blank.
  5. In the Error alert type box, click the type of error alert you want to display to users.
  6. In the ScreenTip box, type the text you want to display when a user points to the control or right-clicks the control.
  7. 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.

advertisement