property Value | |
Syntax: | Variant =
object.Value object.Value = Variant |
Description: | When used on the left of the assignment operator, the property initializes the TrkField object (and ultimately the column in the table it is associated with) with the data. Used on the right of the assignment operator, it returns the field value (from the column in the database table) of the specific record. Notes: Make sure that the correct data type of the database table column is maintained. Call the DataType method on this object
to determine the data type of this field.Example 1: Dim oTrkField As Object ... 'Get the records by using TrkTable.ReadDB
method... ... Set oTrkField = oTrkRecord.TrkFields.Item("Name") 'Update datbase column with new value oTrkField.Value = "Blend 1" oTrkField.Save ... Example 2: Dim oTrkField As Object Dim sName As String ... 'Get the records by using TrkTable.ReadDB
method... ... Set oTrkField = oTrkRecord.TrkFields.Item("Name") 'Extract the data from the database column sName = oTrkField.Value ... ... ... Example 3: How to assign a value to the "timestamp" SQL data type Dim MyDate as variant Set oTrkField =
oTrkRecord.TrkFields.Item("TimeStamp") MyDate = DateSerial(1993,08,22) +
TimeSerial(14,22,30) MsgBox "The date value of " & MyDate oTrkField.Value = MyDate Example 4: How to assign a date value Dim MyDate as variant Set oTrkField =
oTrkRecord.TrkFields.Item("MyDateField") MyDate = DateSerial(2003,08,22) MsgBox "The date value of " & MyDate oTrkField.Value = MyDate |