Getting Started Guide
Figure 181: Fields in Vacations table
Creating tables for the list box
When the same information can be used in several fields, design a table for each type
of information. Each table will contain two fields: the information field and ID, in that
order.
Caution
You must create these tables with the information field listed first and
the ID field listed last. Failure to do so will produce the wrong results.
For my Payment table, I use Name and ID as my fields, with Dan, Kevin,
and Cash being the Name entries. The corresponding ID entries are 0, 1,
2. When the Name field is listed first in the table, one of the three names
will appear in the payment field of the Fuel table. If the ID field is listed
first, 0, 1, or 2 appear in the payment field instead.
1) Follow the directions in “Creating tables in Design View” on page 209. In the
table, the two fields can be Type and PaymentID. In the Field Properties, set
AutoValue to Yes for the PaymentID field. Set the PaymentID field as the
primary key. (See Figure 182.)
2) Save the table using the name Payment Type.
Figure 182: Table in Design View
Note
If you have several tables to create with the same fields, design one table
and produce the other tables by cutting and pasting. (See “Creating a table
by copying an existing table” on page 208.)
212 Getting Started with OpenOffice.org 3.3










