The DataComboView control implements a ComboBox that allows the DB user to select a specific data record in the DB table. The combo pop-up window displays the table content in a DataView.
The DataComboView class has the following special properties:
Property | Data type | Description |
---|---|---|
Columns | String[ ] | Sets the fields to be displayed in a DataComboView or returns the fields in a string array (field names). |
Field | String | Sets the field to be displayed in a DataComboView or returns the field (field name). The data comes from the first data source (DataSource). |
Filter | String | Sets a filter via an SQL Where clause that determines the content to be displayed in the DataComboView. |
Header | Boolean | Determines whether a (horizontal) header is to be displayed or returns the value of its visibility. |
Modified | Boolean | Returns True if the content in the DataComboView has changed. |
Valid | Boolean | Returns True if the content of the control is valid. |
Value | Variant | Sets or reads the value. Note: The `Value` is the primary key of the current database table! |
Table 22.5.6.1.1 : Properties of the DataComboView class
The DataComboView class only has one relevant method: Update( ): Reloads the (current) content of the DataComboView.
The DataComboView class only has one event of significance:
Validate ( Value As Variant ): The event is triggered when the content of the DataComboView needs to be validated before saving. `Value` is the value to be checked from the DataComboView list. This event allows the user to define specific validation requirements. To invalidate the data, simply stop the event with STOP EVENT.