Access Data Types
Access Data Types
LECTURE NOTES
NUMBER data type is assigned to columns/fields whose values are naturally involved in calculations. For
example, in the Access table below, the FeesPayable column/field contains values which are naturally used in
calculations, such as the sum of all fees paid by students, or 5% of fees deductible for SRC.
We may naturally want to and can calculate the total fees paid by all students. We can also calculate fees owed
by students by subtracting FeesPaid from FeesPayable. Note that all fields/columns whose values are naturally
used in computations can be assigned the NUMBER data type.
CURRENCY data type largely has everything as the NUMBER data type, except that a column/field that is
assigned the CURRENCY data type has its values automatically formatted with the dollar currency symbol (we
will demonstrate this in Access soon). The following table details all the data types in Access, their descriptions,
and data limits.
1
Type of Data Description Size
Short Text Text or combinations of text and numbers, including numbers Up to 255 characters.
that are not used for computations (e.g. phone numbers).
Long Text Lengthy text or combinations of text and numbers. Up to 63, 999 characters.
Date/Time Date and time values for the years 100 through 9999. 8 bytes
AutoNumber A unique sequential (incremented by 1) number or random 4 bytes (16 bytes if set to
number assigned by Microsoft Access whenever a new record Replication ID).
is added to a table.
Yes/No Yes and No values and fields that contain only one of two values 1 bit.
(Yes/No, True/False, or On/Off).
If you use previous versions of Access (such as Access 2010 or older), you will notice a difference for
two of those data types.
In Access 2013, we now have two data types — short text and long text. In previous versions of Access
these data types were called text and memo.
The text field is referred to as short text and your memo field is now called long text.
Here are some of the other more specialized data types, you can choose from in Access.
Attachment Files, such as digital photos. Multiple files can be attached per Up to about 2 GB.
record. This data type is not available in earlier versions of
Access.
2
OLE objects OLE objects can store pictures, audio, video, or other BLOBs Up to about 2 GB.
(Binary Large Objects)
Hyperlink Text or combinations of text and numbers stored as text and Up to 8,192 (each part of a
used as a hyperlink address. Hyperlink data type can
contain up to 2048
characters).
Lookup The Lookup Wizard entry in the Data Type column in the Dependent on the data type
Wizard Design view is not actually a data type. When you choose this of the lookup field.
entry, a wizard starts to help you define either a simple or
complex lookup field.
Calculated You can create an expression that uses data from one or more You can create an
fields. You can designate different result data types from the expression that uses data
expression. from one or more fields.
You can designate
different result data types
from the expression.