Describe the data types of fields in Ms Access. (ICS Part-II important long questions)



Q. Describe the data types of fields in Ms Access.
Ans.
MS Access provides the following data types.
Text
Text data type is used to store alphabetic, numbers and special characters.  It can store up to 255 characters.  If length of text field is not specified, the default setting is 50 characters
Memo
Memo data type is used to store lengthy text.  It is normally used to store comments etc. Memo fields can hold up to 64,000 characters.
Number
Number data type is used to store numeric data. The fields with Number data type can be used in mathematical calculations. Different types of numeric data types are as follows:




Data type
Values
Size in bytes
Byte 0 to 255 1
Integer -32,768 to 32767 2
Long Integer -2,147,483,648 to 2,147,483,647 4
Single -3.14x1038 to 3.14x1038 4
Double -1797x10308 to 1797x10308 8
  
The byte, integer and long integer data types cannot store decimal values.  If you need to store values with up to four decimal places only, use the Currency data type in preference to single or double number fields.
Data/Time
Data/time data type is used to store data and time. Ms Access stores data in the standard mm/dd/yyyy format.
Currency
Currency data type is used to store number representing currency.  The value in currency field is rounded to two decimal places.  The negative currency values are displayed in brackets.  The values automatically include a dollar sign($).
AutoNumber
AutoNumber data type is used to generate the next number automatically when a new record is added.  It creates a unique number for each record. The value starts from 1 and is incremented by 1 in each record.
Yes/No
Yes/No data type is used to store Boolean value.  The possible values in this field are True/False or Yes/No.
OLE Object
OLE stands for Object Linking and Embedding .  This data type is used to enter objects from other applications such as a spreadsheet created in Excel or a picture file.
Hyper Link
The Hyper Link data type is used to store links to other files, documents or web pages in a field. A hyperlink address has up to four parts.
  1. The text that appear in the field
  2. The path to a file or URL
  3. A sub address that is a location in the file or page in the website
  4. The text that appears as the tool tip.
Each part is separated by pound sign(#).  The syntax of using hyperlink is as follows:
DisplayText#Address#SubAddress#ScreenTip
An example of using hyperlink is as follows:
Google Home Page#http://www.google.com#c:\My Documents\Database.mdb#MyTable