Type Property

See AlsoDWTZQX              Example1N7M0FD>Low (Professional Edition Only)

Applies To

Field objectKU5EEE.


Determines the type of data a Field1L3F0QJ contains.  Read-only if the Field is a member of the Fields collection17X8LRK of a TableDef.  Read/write only in the Professional Edition with a new object not yet appended to a collection.


field.Type [ = typenumber ]


The symbolic constants and settings of the Type property are:

Constant              Setting    Description   Visual Basic data type


DB_BOOLEAN            1       True/False     Integer (0 or 1)

DB_BYTE                   2       Byte               Integer (0 255)

DB_INTEGER             3       Integer          Integer

DB_LONG                   4       Long              Long

DB_CURRENCY         5       Currency       Double

DB_SINGLE                6       Single            Single

DB_DOUBLE              7       Double          Double

DB_DATE                   8       Date/Time      Variant

DB_TEXT                 10       Text               String

DB_LONGBINARY    11       Long Binary    String

DB_MEMO                12       Memo            String


These values are in the Visual Basic file DATACONS.TXT.


With a data control, the Field is a member of the Fields collection of the Recordset property.  You can also access a Field in a TableDef of the TableDefs collection of the Database property of a data control.

If the database does not support one of these types, an error occurs when a field of that type is used.

In the Professional Edition, you can create a new Field by creating a new Field object, setting its properties, then appending the Field to the Fields collection of a TableDef.

See Also


Fields CollectionQ15ZEN

Name Property2016V9P


Size Property2W0H335


Data Access Guide:

Chapter 2, "Database Management Using Visual Basic"