The following table shows the properties the Field object supports.
Property |
Description |
ActualSize | Indicates the actual length, in bytes, of a field’s value. |
Attributes | Returns a value that indicates one or more characteristics of a Field object. This property is read-only. |
DefinedSize | Used to determine the data capacity of a Field object. It returns the defined size, in characters, of the field. Compare with ActualSize, which returns the size in bytes. |
Name | Returns the name of a field. This property is read-only. |
Type | Indicates the data type of a Field object. The Type property is read-only. |
UnderlyingValue | Indicates a Field object’s current value in the database. |
Value (default) | Indicates a Field object’s current value in the recordset. |
The Field object has no methods or events. With the exception of Value, all the properties are read-only.
The following code example shows how to use a Field object.
Dim rs, f
Set rs = CreateObject("adoce.recordset")
rs.open "MSysTables"
Set f = rs.Fields(0)
Msgbox f.Value, ,f.Name