Microsoft Access 2010 Bible

(Rick Simeone) #1

Chapter 2: Creating Access Tables


49


l (^) OLE Object: Pictures, graphs, sound, video, word processing, and spreadsheet files
l Hyperlink: A field that links to a picture, graph, sound, video, word processing, or
spreadsheet file
One of these data types must be assigned to each of your fields. You may also want to specify the
Field Size property for the Text fields, or accept the default of 255 characters. The Field Size
property specifies the maximum number of characters that a Text data type field may contain.
Specifying data validation rules
The last major design decision concerns data validation, which becomes important as users enter
data. You want to make sure that only good data (data that passes certain defined tests) gets into
your system. You have to deal with several types of data validation. You can test for known indi-
vidual items, stipulating that the Gender field can accept only the values Male, Female, or
Unknown, for example. Or you can test for ranges, specifying that the value of Weight must be
between 0 and 1,500 pounds. You’ll read more about validation rules in the “Validation Rule and
Validation Text” section, later in this chapter.
Assigning field data types
After you name a field, you must decide what type of data the field holds. Before you begin enter-
ing data, you should have a good grasp of the data types that your database uses. Access supports
ten basic data types (see Table 2.2). Some data types (such as numbers) have several options.
TABLE 2.2


Data Types Available in Microsoft Access


Data Type Type of Data Stored Storage Size
Text Alphanumeric characters 255 characters or less
Memo Alphanumeric characters 65,536 characters or less
Number Numeric values 1, 2, 4, or 8 bytes, 16 bytes for Replication
ID (GUID)
Date/Time Date and time data 8 bytes
Currency Monetary data 8 bytes
AutoNumber Automatic number increments 4 bytes, 16 bytes for Replication ID (GUID)
Yes/No Logical values: Yes/No, True/False 1 bit (0 or –1)
OLE Object Pictures, graphs, sound, video Up to 1GB (disk space limitation)
Hyperlink Link to an Internet resource 64,000 characters or less
Attachment A special field that enables you to
attach external files to an Access
database.

Varies by attachment

Lookup Wizard Displays data from another table Generally 4 bytes
Free download pdf