
Chapter 7: Databases and Data Sources
3. If the text box itself is not selected, click away from the text box.
4. Double-click the text box for the Start Date field, not the label.
5. The Properties: Date Field dialog box opens.
6. On the General tab, make sure the following options are set:
○ Dropdown should be set to Yes.
○ Repeat should be set to Yes.
7. Repeat steps 1 through 6 for the following:
○ End Date- Dropdown: Yes; Repeat: Yes
○ Start Time- Default Time: 9:00:00; Spin Button: Yes; Repeat: Yes.
○ End Time- Default Time: 9:30:00; Spin Button: Yes; Repeat: Yes.
8. Close the Properties dialog box.
9. Click File > Save to save our modifications to the form.
For the time fields, we made them easier to use by giving them a default time other than
midnight. Additionally, the spin button may be used instead of keyboard entry.
Adding a list box to a form
If the database has a related field, such as the Calendar database's Type field, that will have a
finite, usually fairly short, list of entries, it may simplify data entry to create a list box to
replace the text box on a form. With a list box, we choose one value and actually add a
related value to the table.
1. In the Form Controls toolbar, usually at the bottom of the screen, click the List
Box button.
2. Click and drag in an empty area of the form to create a box about the size of the Type
field that is already on the form.
3. The List Box wizard opens.
4. On the first screen, Table Selection, click Types. This is the table that contains the
data for the list box.
5. Click Next.
6. On the second screen, Field Selection, click TypeName. This is the field containing
the display text for the list box entries.
7. Click Next.
8. On the third screen, Field Link, in the Field from the Value Table list click Type
and in the Field from the List Table list click ID. This creates the link between the
key value that underlies the displayed value and the field that the value is written to.
9. Click Finish.
OpenOffice.org User Guide for 2.x 369
Kommentare zu diesen Handbüchern