A data type determines what kind of information a field can store in a Microsoft Access table. Choosing the correct data type helps maintain accurate data and perform suitable operations.
A data type defines the type of value that can be stored in a field.
Examples:
For example, the StudentName field stores text, while AdmissionDate stores a date or time value.
Short Text stores text and characters, such as names, addresses, phone numbers, and codes. In modern Access, a Short Text field can store up to 255 characters.
Common uses:
Phone numbers should generally use Short Text because they are identifiers, not values used for arithmetic.
Long Text stores longer descriptions, comments, notes, and other extended text information.
Use Long Text when the information may be longer than a normal Short Text field can accommodate.
Number stores numeric values that may be used in calculations. The available field size determines the range and precision of the values.
Common uses:
Do not use Number for phone numbers or postal codes because these values are usually identifiers rather than quantities.
Date/Time stores date and time values. It can be used to record when an event occurred.
Example values:
The displayed format depends on the field format and regional settings. Use date values rather than text when you need date comparisons and calculations.
Currency stores monetary values and is designed for financial calculations.
Common uses:
Currency helps represent monetary amounts consistently. The currency symbol displayed depends on formatting and regional settings.
AutoNumber automatically generates a value for each new record. It is commonly used to create a unique record ID.
| StudentID | StudentName |
|---|---|
| 1 | Rahul Kumar |
| 2 | Priya Kumari |
| 3 | Amit Kumar |
When you add another record, Access generates its AutoNumber value automatically.
AutoNumber values are not guaranteed to be continuous or reused after a record is deleted.
Yes/No stores a logical value with two states, such as Yes or No, or True or False.
This data type is useful when a field represents a simple two-state condition.
Stores hyperlinks to websites or other supported destinations.
Example: https://example.com
Allows files to be attached to a database record.
Example: A document attached to a student record.
Calculates a value using an expression based on other fields in the same table.
Example: TotalAmount = Quantity × Price.
Helps create a field that selects values from a list or another data source. It is a field-design wizard, not a separate stored data type.
An older Access field type for embedding or linking supported objects. For many modern applications, Attachment or an external file reference may be more appropriate.
| Data Type | Purpose | Example |
|---|---|---|
| Short Text | Short text and identifiers | Rahul |
| Long Text | Long descriptions | Student remarks |
| Number | Numeric calculations | 85 |
| Date/Time | Dates and times | 11/10/2026 |
| Currency | Financial amounts | ₹5,000 |
| AutoNumber | Automatically generated IDs | 101 |
| Yes/No | Two-state values | Yes |
| Hyperlink | Links | Website URL |
| Attachment | Files associated with records | PDF document |
| Calculated | Values calculated from expressions | Quantity × Price |
Important: Changing a field's data type can cause data conversion problems or data loss. Back up the database and check existing values before making major changes.
Create a table named Students with these fields:
| Field Name | Required Data Type |
|---|---|
| StudentID | AutoNumber |
| StudentName | Short Text |
| Mobile | Short Text |
| AdmissionDate | Date/Time |
| CourseFee | Currency |
| IsActive | Yes/No |
| Remarks | Long Text |
Tasks:
1. Which data type is suitable for a student's name?
2. Which data type is suitable for storing course fees?
3. Which data type automatically generates values for new records?