>
ValidationText Property
Applies To
Dynaset-Type Recordset Object, Field Object, Recordset Object, Snapshot-Type Recordset Object, Table-Type Recordset Object, TableDef Object.
Description
Sets or returns a value that specifies the text of the message that your application displays if the value of a Field object doesn't satisfy the validation rule specified by the ValidationRule property setting.
For an object not yet appended to a collection, this property is read/write. For a Recordset object, this property setting is read-only. For a TableDef object, this property setting is read-only for an attached table and read/write for a base table.
Settings and Return Values
The setting or return value is a string expression that specifies the text displayed if an entered value is invalid. The data type is String.
Remarks
For a Field object, use of the ValidationText property depends on the object that contains the Fields collection that the Field object is appended to, as the following table shows.
| Object appended to | Usage |
|
| Index | Not supported |
| QueryDef | Read-only |
| Recordset | Read-only |
| Relation | Not supported |
| TableDef | Read/write |
See Also
AllowZeroLength Property, QueryDef Object, Required Property, ValidateOnSet Property, ValidationRule Property, Value Property.
Example (Microsoft Access)
See the ValidationRule property example (Microsoft Access).