Microsoft Office Tutorials and References
In Depth Information
5. Click the Caption property box, and then type Invoice Num . The definition of the
first field is complete. See Figure 2-11.
InvoiceNum ﬁ eld deﬁ ned
Text d ata type
prope rty set
Caption property set
Oren’s Invoice table design (Figure 2-9) shows ContractNum as the second ﬁ 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
ﬁ eld, which is the Contract table’s primary key. Recall that when you include the primary
key from one table as a ﬁ eld in a second table to connect the two tables, the ﬁ eld is a
foreign key in the second table. The ﬁ eld must be deﬁ ned in the same way in both tables.
Next, you will deﬁ ne ContractNum as a Text ﬁ eld with a ﬁ eld size of 4. Later in this
session, you’ll change the Field Size property for the ContractNum ﬁ eld in the Contract
table to 4 so that the ﬁ eld deﬁ 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.