Microsoft Office Tutorials and References
In Depth Information
Defining Fields
5. Click the Caption property box, and then type Invoice Num . The definition of the
first field is complete. See Figure 2-11.
Figure 2-11
InvoiceNum fi eld defi ned
Text d ata type
is selected
Description property
entered
Field Size
prope rty set
Caption property set
Oren’s Invoice table design (Figure 2-9) shows ContractNum as the second fi eld.
Because Oren and other staff members want to relate information about invoices to the
contract data in the Contract table, the Invoice table must include the ContractNum
fi eld, which is the Contract table’s primary key. Recall that when you include the primary
key from one table as a fi eld in a second table to connect the two tables, the fi eld is a
foreign key in the second table. The fi eld must be defi ned in the same way in both tables.
Next, you will defi ne ContractNum as a Text fi eld with a fi eld size of 4. Later in this
session, you’ll change the Field Size property for the ContractNum fi eld in the Contract
table to 4 so that the fi eld defi nition is the same in both tables.
To define the ContractNum field:
1. In the Table Design grid, click the second row’s Field Name box, type ContractNum
in the box, and then press the Tab key to advance to the Data Type box.
2. Press the Tab key to accept Text as the field’s data type. Because the ContractNum
field is a foreign key to the Contract table, you’ll enter “Foreign key” in the
Description box to help users of the database understand the purpose of this field.
3. Type Foreign key in the Description box. Next, you’ll change the Field Size
property to 4.
4. Press the key to move to the Field Properties pane. The current entry for the F6
Field Size property, 255, is highlighted.
5. Type to set the Field Size property. Finally, you need to set the Caption property 4
for this field.
6. Press the Tab key three times to move to the Caption box, and then type
Contract Num . You have completed the definition of the second field.
Search JabSto ::




Custom Search