The values that can be entered into a control are determined by the data type (data type: Property of a field that defines the kinds of data the field can store. Examples of data types include Text, Rich Text, Whole Number, Decimal, True/False, Hyperlink, Date and Time, and Picture.) of the 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.) that is bound to the control. If a user types a value with the wrong data type into a control, an inline alert (inline alert: A data validation alert that marks controls that contain invalid data with a dashed red border. Users can right-click controls to display custom error messages.) will appear.
You can change the data type of a field by using the control's properties for text boxes, list boxes, date pickers, check boxes, and option buttons. Other controls, such as sections, list controls, and picture controls, either do not have a data type or can store only one kind of data type. For fields that do not have a control bound to them, you can change their data type directly in the data source (data source: The collection of fields and groups that define and store the data for an InfoPath form. Controls in the form are bound to the fields and groups in the data source.).
Change the data type of a field using the control's properties
- In design mode, double-click the control whose
data type you want to change.
- On the Data tab in the Control Properties dialog box, click the data type you want in the
Data type
list.
Change the data type of a field directly in the data source
- In design mode, if the Data Source task pane is not visible, click Data Source on the View menu.
- If your form uses more than one data source, click the one you want in the Data source list in the Data Source task pane.
- Double-click the field or group whose data type you want to change
- On the Data tab in the Field or Group Properties dialog box, click the data type you want in the Data type list.
Notes