Page 48 - AIS access_chang_ingraham
P. 48
46 CHAPTER 3 USING ACCESS TO IMPLEMENT A RELATIONAL DATABASE
Which input mask matches how you want data to look?
To see how a selected mask works, use the Try It box.
To change the Input Mask list, click the Edit List button.
Input Mask: Data Look:
1:12:00 PM
1"'0' Tim' v
Short Date
Edit bist I [ Cancel I
[ < j!ack Next >
FIGURE 3-11
4. The third Field Name is PurchaseAmount. The Data Type is Currency. The
Caption is Purchase Amount.
5. The fourth Field Name is ArtistlD. The Data Type is Text. The field size is 6. The
Caption is Artist ID.
Notice that you have already used the Field Name Artist/D. It is the primary key in
the Artist Table. As we mentioned before, when a field name appears in one table that is
a primary key in another table, it is called a Foreign Key. Foreign keys are used to link
tables together. Aforeign key must be the same data type as the corresponding primary key
it will be linked to.
6. You will now save the table as Purchase Table.
Creating and Opening a Form
Although the data can be entered from the datasheet view of a table, the utilization of
forms makes data easier to enter and makes the database much more user-friendly. A form
can display data in almost any format. A very simple form can be designed to display one
record at a time. More complex forms can be created as 'fill-in-the-blanks' forms resem-
bling the paper forms a company already uses.
1. Before entering data into the Customer Table, you will create a form utilizing the
Form Wizard as indicated in Figure 3-12. Double click the selection of Create form by
using wizard.
2. In the form wizard window (see Figure 3-13), use the pull down menu to choose
Customer Table and select for inclusion in the form all fields created in the table by click-
ing on the » button in the middle of the window. Then click on Next.
3. The wizard's next window allows you to choose a layout. Take some time to view
each of the various layouts and then select the Columnar format. Click Next.

