Database Programming
Microsoft Corporation
Microsoft Access

Explain the different data types available in Microsoft Access?

User Avatar
Wiki User
November 16, 2010 2:57PM

Choosing Field Names Microsoft Access gives you lots of flexibility when it comes to naming your fields. A field name can be up to 64 characters long, and can include any combination of letters, numbers, spaces, and special characters except a period (.), an exclamation point (!), an accent grave ('), and brackets ([ ]); however, the name cannot begin with a space, and cannot include control characters (ANSI values 0 through 31).

In general, you should give your fields meaningful names and should use the same name throughout for a field that occurs in more than one table. You should avoid using field names that might also match any name interval to Microsoft Access or Visual Basic. For example, all objects have a Name property, so it's a good idea to qualify a field containing a name by calling it CustomerName or ClubName. You should also avoid names that are the same as built-in functions, such as Date, Time, Now, or Space. See Microsoft Access help for a list of all built-in functions names. For character data,

You should normally select the Text data type. You can control the maximum length of a Text field by using a field property. Use the Memo data type only for long strings of text that might exceed 255 characters or that might contain formatting characters such as tabs or line endings (carriage returns). When you select the Number data type,

You should think carefully about what you enter as the Field Size property because this property choice will affect precision as well as length. (For example, integer numbers do not have decimals.) The Date/Time data type,

Useful for calendar or clock data and has the added benefits of allowing calculations in minutes, seconds, hours, days, months, or years. For example, you can find out the differences in days between two Date/Time values.

Use the Date/Time data type to store any date, time, or date and time value. Currency data type,

For storing money values. Currency has the precision of integers, but with a fixed number of decimal places. When you need to store a precise fractional number that's not money, use the Number data type and choose the Decimal field size. The AutoNumber data type,

Specifically designed for automatic generation of primary key values. Depending on the Field Size and New Values properties you choose for an AutoNumber field, you can have Access create a sequential or random long integer. You can include only one field using the AutoNumber data type. Use the Yes/No data type,

Hold Boolean (true or false) values. This data type is particularly useful for flagging accounts paid or not paid or orders filled or not filled. The OLE Object data type allows you to store complex data, such as pictures, graphs, or sounds that can be maintained by a dynamic link to another Window-based application. For example, Access can store and allow you to edit a Microsoft Word document, a Microsoft Excel spreadsheet, a Microsoft PowerPoint presentation slide, a sound file (wav), a video file (avi), or picture created using the Paint or Draw application. The Hyperlink data type lets you store a simple or complex "link" to an external file or document. This link can contain a Uniform Resource Locator (URL) that points to a location on the World Wide Web or on a local intranet. It can also contain the Universal Naming Convention (UNC) name of a file on a server on your local area network (LAN) or on your local computer drives. The link can point to a file that is in Hypertext Markup Language (HTML) or in a format that is supported by an ActiveX application on your computer. For more details refer http://msaccess.batcave.net/page04.htm