TrkField.DataType (read-only property)

property DataType
Syntax: Variant = object.DataType
Description:
Read Only property.
Represents the data type of the field in the database table. This long number value can be one of the followings.

Constant Value Description

Name........Value.....Description
Empty........00 ......Empty (uninitialized)
Null.........01 ......Null (no valid data)
Integer......02 ......Integer
Long.........03 ......Long integer
Single.......04 ......Single-precision floating-point number
Double.......05 ......Double-precision floating-point number
Currency.....06 ......Currency
Date.........07 ......Date
String.......08 ......String
Boolean......11 ......Boolean
Variant......12 ......Variant
Byte.........17 ......Byte

Example:

Dim oField As Object

...
'Get the records by using TrkTable.ReadDB method...
...

For Each oField In oTrkRecord.TrkFields
    MsgBox "Field Name: " oField.Name
    If oField.DataType = 8 Then 'String
       MsgBox "Field Value: " & oField.Value & "Field Maximum char Length:" & oField.MaxLength
    Else If oField.DataType = 7 Then 'Date
       MsgBox "Field Value is Date: " & oField.Value
    End If
Next
...