MS Access Data Types - MS Access

What are the data types in MS Access?

Every field in a table will have properties and these properties will define the field's characteristics and behavior. Most important property for a field is its data type and a field's data type will determine what kind of data it can store. MS Access supports different types of data, each with a specific purpose.

  • Data type determines the kind of the values which users can store in any given field.
  • Each field stores data which consists of only a single data type.

Below are some of the most common data types used in a typical Microsoft Access database.

Type of Data

Description

Size

Short Text

This is used for text or combinations of text and numbers, including numbers which do not require calculating (e.g. phone numbers).

Up to 255 characters.

Long Text

This is used for Lengthy text or combinations of text and numbers.

Up to 63, 999 characters.

Number

This is Numeric data used in mathematical calculations.

1, 2, 4, or 8 bytes (16 bytes if set to Replication ID).

Date/Time

This is used for Date and time values for the years 100 through 9999.

8 bytes

Currency

Currency values and numeric data used in mathematical calculations involving data with one to four decimal places.

8 bytes

AutoNumber

This is a unique sequential (incremented by 1) number or random number assigned by Microsoft Access whenever a new record is added to a table.

4 bytes (16 bytes if set to Replication ID).

Yes/No

Yes and No values and fields which consist of only one of two values (Yes/No, True/False, or On/Off).

1 bit.

  • When you use previous versions of Access, you will observe a difference for two of those data types.
  • Access 2013 has two data types — short text and long text. In previous versions of Access these data types were called as text and memo.
  • Text field will be referred to as short text and your memo field will now be called long text.

Below are some of the more specialized data types which can be chosen from Access.

Data Types

Description

Size

Attachment

Used for attaching files such as digital photos. Multiple files can be attached per record. This data type is not available in earlier versions of Access.

Up to about 2 GB.

OLE objects

OLE objects stores pictures, audio, video, or other BLOBs (Binary Large Objects)

Up to about 2 GB.

Hyperlink

Text or combinations of text and numbers will be stored as text and used as a hyperlink address.

Up to 8,192 (each part of a Hyperlink data type can contain up to 2048 characters).

Lookup Wizard

Lookup Wizard entry in the Data Type column in the Design view is not actually a data type. But when you choose this entry, a wizard will start helping you to define either a simple or complex lookup field.

It is a simple lookup field which uses the contents of another table or a value list for validating the contents of a single value per row. A complex lookup field will help in storing multiple values of the same data type in each row.

Dependent on the data type of the lookup field.

Calculated

An expression can be created which uses data from one or more fields. You can designate different result data types from the expression.

An expression can be created which uses data from one or more fields. You can designate different result data types from the expression.

These are the different data types which you can choose from while creating fields in a Microsoft Access table.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

MS Access Topics