See Also Example (Professional Edition Only)
Applies To
Field object.
Description
Determines the type of data a Field Read-only if the Field is a member of the Fields collection of a TableDef. Read/write only in the Professional Edition with a new object not yet appended to a collection.
Usage
field.Type [ = typenumber ]
Setting
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.
Remarks
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.
Help:
Fields Collection
Name Property
New
Size Property
Data Access Guide:
Chapter 2, "Database Management Using Visual Basic"