Working with Repeating Tables


Tables are another easy way to organize data entry objects on a form and provide an easy way to enter multiple rows of data, as shown in Figure 7-18, which is the sample Expense Report form used earlier in this chapter.

click to expand
Figure 7-18: Expense Report form with a repeating table

Inserting a Repeating Table

To insert a table into your form, you have two choices. If you are building your data source as you go, you can drag the Repeating Table control from the Controls task pane directly onto your form. This opens the dialog box shown in the following illustration, in which you can enter the number of columns that you want to use in your repeating table.

If you are working with an existing data source, you can use the same process instead of specifying the number of columns, the Repeating Table Binding dialog box shown in the following illustration will appear and prompt you for a group within your data source to bind to.

click to expand

Notice that this dialog box is slightly different from the Binding dialog boxes that you looked at when creating sections—this dialog box has a Next button, because now you need to select which fields are going to be shown in your repeating table. Click Next to go to the second step, where you use the dialog box shown in the following illustration to select the fields to appear.

click to expand

To select a field, highlight it in the list on the left and click the Add button to move it to the list of selected fields on the right. When you are finished selecting fields, click the Finish button to accept your changes and return to your form design. Your repeating table will be inserted into your form (shown in Figure 7-19) using the fields you selected.

click to expand
Figure 7-19: A typical repeating table

Keep in mind that all the fields were inserted using the default data entry object for that field type. For example, you may have a text box inserted for a particular field, but you really may want to use that field as a drop-down list. To change the object type, right-click an object and use the Change To menu, shown in the following illustration, to change the object to the desired type.

click to expand

Note

The Change To menu is not specific to sections and can be used to change fields and sections to different types. For example, you could have a text box in which you want to display a date. You could right-click the text box and use the Change To menu to change to another type of data entry control.

Like sections, when you preview your form, an arrow icon appears to the left of the table that enables you to insert and remove rows.

Tip

You can also use CTRL-ENTER at the end of each line to insert a new line, a shortcut that you may want to point out to form users to enable them to enter data quicker.

Formatting Tables

Two sets of properties are associated with a repeating table: the generic properties that are normally associated with a table (for example, rows, columns, alignment, and so on) and the formatting options that are specific to a repeating table.

To format just the table itself, right-click the table and select Table Properties to open the dialog box shown here.

A number of different property pages are associated with the table itself, enabling you to select the alignment for the table, as well as the height and width of the rows, and the alignment and padding for the cells in the table.

In addition to these formatting options, you can also control the look and feel of your table through the right-click menu associated with the table, as shown here.

From this menu, you can insert or delete rows, as well as set the borders and shading for the table (discussed in Chapter 8, which is all about formatting).

To access the formatting options that are specific to repeating tables, right-click the table and select Properties. The formatting options for repeating tables are similar to those for sections, so the only thing to note here is that if you want to change the binding for your table, click the Change Binding button to invoke the Binding dialog box previewed in Figure 7-6 and select the group and fields to be used for your table.




How to Do Everything with Microsoft Office InfoPath 2003
How to Do Everything with Microsoft Office InfoPath 2003 (How to Do Everything)
ISBN: 0072231270
EAN: 2147483647
Year: 2006
Pages: 142

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net