Data Types
Data Types
field. Each field can store data consisting of only a single data type.
Setting
The DataType property uses the following settings.
Note: Text was replaced by Short text Up to 255 characters or the length
in Access 2013.(Default) Text or set by the FieldSizeproperty,
Text combinations of text and numbers, as whichever is less. Microsoft Access
well as numbers that don't require does not reserve space for unused
calculations, such as phone numbers. portions of a text field.
Date/Time Date and time values for the years 100 8 bytes.
1
Setting Type of data Size
through 9999.
Attachment Any supported type of file You can attach images, spreadsheet
files, documents, charts, and other
types of supported files to the
2
Setting Type of data Size
In Visual Basic , you can use the ADO Type property to set a field's data type
before appending it to the Fieldscollection.
Remarks
Memo, Hyperlink, and OLE Object fields can't be indexed.
3
4
Property
You can use the FieldSize property to set the maximum size for data stored in
a field set to the Text, Number, or AutoNumber data type.
Setting
If the DataType property is set to Text, enter a number from 0 to 255. The
default setting is 50.
If the DataType property is set to Number, the FieldSize property settings and
their values are related in the following way.
Decimal
Storag
Setting Description precisio
e size
n
Replication
Globally unique identifier (GUID) N/A 16 bytes
ID
5
You can set this property only from the table's property sheet.
To set the size of a field from Visual Basic , use the DAO Size property to read
and set the maximum size of Text fields (for data types other than Text, the
DAO Type property setting automatically determines the Size property setting).