Microsoft Access 2010 Bible

(Rick Simeone) #1

xliv


Introduction


Cross-Reference
You learn more about relational database theory and how to build tables in Part I of this book

l tblSalesPayments contains fields for the individual payment lines. The invoice may
be paid for by a variety of methods. The customer may make a deposit for the sale with a
check, and then split the remaining amount owed with a variety of credit cards. By having
unlimited payment lines in the Invoice form you can do this.
The data fields in tblSalesPayments include the invoice number that’s used to link to
tblSales. There is also a field for the payment type to allow the entry of the payment
type (credit card, cash, and so on).
l tblCustomerContacts contains information about the people and companies that do
business with Collectible Mini Cars. Names, physical and shipping addresses, phone and
fax numbers, e-mail addresses, Web sites, and all the financial information are stored in
this table. Unlike tblSalesLineItems, the contact data is linked from an Invoice form
and is not copied to any other table. This way, if a customer changes her address or phone
number, any invoice that is related to the contact data instantly shows the updated infor-
mation.
l tblProducts is one of the main tables used in this book. The Products form is used
to teach nearly all form development lessons in the book so you should pay particular
attention to its design and construction.
l tblCategories is used to lookup a list of product categories. Each category includes
the category name and description.

The Products form
frmProducts, shown in Figure FM.3, illustrates one approach for building Access forms. It’s also
one of the forms used most frequently through the book. The Products form was developed with
many of the Microsoft Access form control types that handle data types such as text, currency,
date, yes/no, memo, and OLE pictures.

You need a good understanding of the use of the form as well as the technical details of how it’s
built. The form contains information about each product and is bound (tied to) tblProducts.
As you enter information into frmProducts, it’s stored in the tblProducts table.

The top of frmProducts contains a control that allows you to quickly find a record. This Quick
Find is programmed using VBA code behind a combo box selection. The bottom of the form con-
tains a series of command buttons demonstrating how to create new records, delete existing
records, and display Search and Print dialog boxes.

03_475348-flast.indd xliv03_475348-flast.indd xliv 4/1/10 1:43 PM4/1/10 1:43 PM

Free download pdf