FieldValue
Applies to
VAccess
Description
Sets or returns the value of the field specified for the current record in memory or the current row of an extended fetch record set.
Syntax
object.FieldValue (field)
The FieldValue property syntax has these parts:
 
Remarks
Data is read from and written to the current record in memory. Changes made to the record are not saved in the PSQL file until a successful Update or Insert method is invoked.
If a column is formatted the value for the contents of that column will always be returned as a BStr, regardless of data type (the container may automatically translate this to a String, Variant, AnsiString, or other variety of character data). If a column is not formatted, the value will be returned as the variant that most closely approximates the data type of the column. Most control containers can manipulate, internationalize, and re-format this returned variant much more easily and quickly than a BStr. For this reason, we recommend that unformatted columns be retrieved whenever possible.
This property is not available at design time.
If the ExtendedOps property of the control is True, the field parameter should specify the column name or column index of the column in the current row, indicated by the value of the Row property. If no parameter is specified, the column returned will be the column specified in the Column property. The FieldValue property is read-only if the ExtendedOps property of the control is True.
You can also use the RowColumnValue method to return a value from any valid Row and Column coordinates in an extended fetch record set.
Example
Dim stat As Integer
VAccess1.FieldValue("msa_desc") = Text1.Text
If Check1.FieldValue = 1 Then
  stat = VAccess1.GetEqual
Else
  stat = VAccess1.GetGreaterOrEqual
End If
If stat = 0 Then
  Text1.Text = VAccess1.FieldValue("msa_desc")
  Text2.Text = VAccess1.FieldValue("population")
  Text3.Text = VAccess1.FieldValue(2)
  'the third field in the record
End If
See Also
Affected by: ExtendedOps, Row