Occurs when the user presses and then releases a mouse button over the DBCombo control. This event also occurs by pressing the up or down arrow keys on the keyboard to select an item.
Syntax
Private Sub object_Click( [index As Integer ,] Area As Integer )
The Click event syntax has these parts:
Part | Description |
object | An object expression that evaluates to an object in the Applies To list. |
index | An integer that uniquely identifies a control if it's in a control array. |
Area | An integer expression that specifies where the control was clicked, as described below. |
The Area parameter can contain the following values:
Constant | Value | Description |
dbcAreaButton | 0 | The user clicked the button on the DBCombo control. |
dbcAreaEdit | 1 | The user click in the text box part of the DBCombo control. |
dbcAreaList | 2 | The user clicked in the drop-down list part of the DBCombo control. |
Remarks
The DBCombo control does not have a DropDown event like the standard combo box to signal when the user drops down the list portion of the DBCombo control. Instead the user can use the Area parameter in the Click event to tell the user which area in the DBCombo control the user clicked.
Typically, you attach a Click event procedure to a control to carry out commands and command-like actions.
Clicking a control generates MouseDown and MouseUp events in addition to the Click event. When you're attaching event procedures for these related events, be sure that their actions don't conflict. If the order of events is important in your application, test the control to determine the event order.
Note To distinguish between the left, right, and middle mouse buttons, use the MouseDown and MouseUp events.