Fields Data Types in MS Access

Posted In Tutorials - By NitiN Kumar Jain On Wednesday, January 14th, 2009 With 0 Comments






Pin It


Ever wondered,

  • what do data types assigned to fields in MS Access mean?
  • Or which data type should be used when?
  • Or for that matter what all data types that are available in MS Access database?

Every field in Access requires that a data type be assigned to it and here is the list:

Text:

Use for text or combinations of text and numbers, such as addresses, or for numbers that do not require calculations, such as phone numbers, part numbers, or postal codes.

Stores up to 255 characters. The FieldSize property controls the maximum number of characters that can be entered.

Memo:

Use for lengthy text and numbers, such as notes or descriptions.

Stores up to 65,536 characters.

Number:

Use for data to be included in mathematical calculations, except calculations involving money (use Currency type).

Stores 1, 2, 4, or 8 bytes; stores 16 bytes for Replication ID (GUID). The FieldSize property defines the specific Number type.

Date/Time:

Use for dates and times.

Stores 8 bytes.

Currency:

Use for currency values and to prevent rounding off during calculations.

Stores 8 bytes.

AutoNumber:

Use for unique sequential (incrementing by 1) or random numbers that are automatically inserted when a record is added.

Stores 4 bytes; stores 16 bytes for Replication ID (GUID).

Yes/No:

Use for data that can be only one of two possible values, such as Yes/No, True/False, On/Off. Null values are not allowed.

Stores 1 bit.

OLE Object:

Use for OLE objects (such as Microsoft Word documents, Microsoft Excel spreadsheets, pictures, sounds, or other binary data) that were created in other programs using the OLE protocol.

Stores up to 1 gigabyte (limited by disk space).

Hyperlink:

Use for hyperlinks. A hyperlink can be a UNC path or a URL.

Stores up to 64,000 characters.

-NKJ