Datasheet
Figure 1-3 Opening the table in Design view allows
you to add field names or change existing ones.
Exploring data types
The field’s data type ensures that only a certain type of data is allowed in the
field. If a data type is tagged as a number, Access will not allow any text to be
entered into that field. By setting the data type of each column, you go a long
way toward ensuring the integrity and consistency of the data. The concept of
the data type is crucial to not only understanding Access, but also to unlocking
the power of the programming language behind Access, VBA. Quite simply,
computers process and store data and that data is categorized by its type.
With the CustomerMaster table left open in Design view, place your cursor
in the Data Type section of the first field and click the drop-down arrow shown
in Figure 1-3. Alist of predefined data type choices becomes visible. These data
types are Text, Memo, Number, Date/Time, Currency, AutoNumber, Yes/No,
OLE Object, and Hyperlink. The following sections describe these data types
in more detail.
Text
Any combination of letters, numbers, spaces, and characters is considered
Text. This is by far the most common data type. Although Text can be a num-
ber, it should not be a number used in a calculation. Examples of the Text data
type are customer names, customer numbers (using customer numbers in cal-
culations would have no meaning), and addresses. The maximum number of
characters allowed in a Text field is 255.
6 Chapter 1
05_59978X ch01.qxp 12/1/05 7:46 PM Page 6