DataType property (2024)

  • Article

Applies to: Access 2013 | Access 2016

Use the DataType property to specify the type of data stored in a table field. Each field can store data consisting of only a single data type.

Setting

The DataType property uses the following settings.

SettingType of dataSize
TextNOTE: Text was replaced by Short text in Access 2013.(Default) Text or combinations of text and numbers, as well as numbers that don't require calculations, such as phone numbers.Up to 255 characters or the length set by the FieldSize property, whichever is less. Microsoft Access does not reserve space for unused portions of a text field.
Short TextNOTE: Short Text was introduced in Access 2013. It replaced Text.(Default) Text or combinations of text and numbers, as well as numbers that don't require calculations, such as phone numbers.Up to 255 characters or the length set by the FieldSize property, whichever is less. Microsoft Access does not reserve space for unused portions of a text field.
MemoNOTE: Memo was replaced by Long Text in Access 2013. Lengthy text or combinations of text and numbers.Up to 63,999 characters. (If the Memo field is manipulated through DAO and only text and numbers [not binary data] will be stored in it, then the size of the Memo field is limited by the size of the database.)
Long TextNOTE: Long Text was introduced in Access 2013. It replaced Memo. Lengthy text or combinations of text and numbers.Up to 63,999 characters. (If the Long Text field is manipulated through DAO and only text and numbers [not binary data] will be stored in it, then the size of the Long Text field is limited by the size of the database.)
NumberNumeric data used in mathematical calculations. For more information on how to set the specific Number type, see the FieldSize property topic.1, 2, 4, or 8 bytes (16 bytes if the FieldSize property is set to Replication ID).
Date/TimeDate and time values for the years 100 through 9999.8 bytes.
CurrencyCurrency values and numeric data used in mathematical calculations involving data with one to four decimal places. Accurate to 15 digits on the left side of the decimal separator and to 4 digits on the right side.8 bytes.
AutoNumberA unique sequential (incremented by 1) number or random number assigned by Microsoft Access whenever a new record is added to a table. AutoNumber fields can't be updated. For more information, see the NewValues property topic.4 bytes (16 bytes if the FieldSize property is set to Replication ID).
Yes/NoYes and No values and fields that contain only one of two values (Yes/No, True / False, or On/Off).1 bit.
OLE ObjectAn object (such as a Microsoft Excel spreadsheet, a Microsoft Word document, graphics, sounds, or other binary data) linked to or embedded in a Microsoft Access table.Up to 1 gigabyte (limited by available disk space)
HyperlinkText or combinations of text and numbers stored as text and used as a hyperlink address. A hyperlink address can have up to four parts: text to display — the text that appears in a field or control; address — the path to a file (UNC path) or page (URL); subaddress — a location within the file or page; screentip — the text displayed as a tooltip.Each part of the parts of a Hyperlink data type can contain up to 2048 characters.
AttachmentAny supported type of fileYou can attach images, spreadsheet files, documents, charts, and other types of supported files to the records in your database, much like you attach files to email messages. You can also view and edit attached files, depending on how the database designer sets up the Attachment field. Attachment fields provide greater flexibility than OLE Object fields, and they use storage space more efficiently because they don't create a bitmap image of the original file.
Lookup WizardCreates a field that allows you to choose a value from another table or from a list of values by using a list box or combo box. Clicking this option starts the Lookup Wizard, which creates a Lookup field. After you complete the wizard, Microsoft Access sets the data type based on the values selected in the wizard.The same size as the primary key field used to perform the lookup, typically 4 bytes.

You can set this property only in the upper portion of table Design view.

In Visual Basic , you can use the ADO Type property to set a field's data type before appending it to the Fields collection.

Remarks

Memo, Hyperlink, and OLE Object fields can't be indexed.

Tip

Use the Currency data type for a field requiring many calculations involving data with one to four decimal places. Single and Double data type fields require floating-point calculation. The Currency data type uses a faster fixed-point calculation.

Warning

Changing a field's data type after you enter data in a table causes a potentially lengthy process of data conversion when you save the table. If the data type in a field conflicts with a changed DataType property setting, you may lose some data.

Set the Format property to specify a predefined display format for Number, Date/Time, Currency, and Yes/No data types.

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.

DataType property (2024)
Top Articles
How to Maximize Your Tax Return
How to Build a DeFi App in 2024: a step-by-step development guide
Uca Cheerleading Nationals 2023
The UPS Store | Ship & Print Here > 400 West Broadway
How To Do A Springboard Attack In Wwe 2K22
Belle Meade Barbershop | Uncle Classic Barbershop | Nashville Barbers
Blackstone Launchpad Ucf
Hotels Near 500 W Sunshine St Springfield Mo 65807
Pollen Count Central Islip
Best Pawn Shops Near Me
What is the surrender charge on life insurance?
Top Hat Trailer Wiring Diagram
10 Best Places to Go and Things to Know for a Trip to the Hickory M...
Classic Lotto Payout Calculator
Teenleaks Discord
Nhl Wikia
Paychex Pricing And Fees (2024 Guide)
Missed Connections Dayton Ohio
Watch The Lovely Bones Online Free 123Movies
Loves Employee Pay Stub
Www Craigslist Com Bakersfield
Rqi.1Stop
Qhc Learning
Ivegore Machete Mutolation
St Clair County Mi Mugshots
15 Primewire Alternatives for Viewing Free Streams (2024)
Malluvilla In Malayalam Movies Download
Kitchen Exhaust Cleaning Companies Clearwater
Narragansett Bay Cruising - A Complete Guide: Explore Newport, Providence & More
Motorcycle Blue Book Value Honda
TMO GRC Fortworth TX | T-Mobile Community
Guinness World Record For Longest Imessage
Chadrad Swap Shop
Maybe Meant To Be Chapter 43
Metro 72 Hour Extension 2022
Edict Of Force Poe
Oxford Alabama Craigslist
SF bay area cars & trucks "chevrolet 50" - craigslist
Albertville Memorial Funeral Home Obituaries
Dollar Tree's 1,000 store closure tells the perils of poor acquisitions
Search All of Craigslist: A Comprehensive Guide - First Republic Craigslist
Gvod 6014
Electronic Music Duo Daft Punk Announces Split After Nearly 3 Decades
511Pa
Arnesons Webcam
Pathfinder Wrath Of The Righteous Tiefling Traitor
Unlock The Secrets Of "Skip The Game" Greensboro North Carolina
Cars & Trucks near Old Forge, PA - craigslist
Uno Grade Scale
March 2023 Wincalendar
91 East Freeway Accident Today 2022
Ingersoll Greenwood Funeral Home Obituaries
Latest Posts
Article information

Author: Kieth Sipes

Last Updated:

Views: 6218

Rating: 4.7 / 5 (47 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Kieth Sipes

Birthday: 2001-04-14

Address: Suite 492 62479 Champlin Loop, South Catrice, MS 57271

Phone: +9663362133320

Job: District Sales Analyst

Hobby: Digital arts, Dance, Ghost hunting, Worldbuilding, Kayaking, Table tennis, 3D printing

Introduction: My name is Kieth Sipes, I am a zany, rich, courageous, powerful, faithful, jolly, excited person who loves writing and wants to share my knowledge and understanding with you.