PRB: Clicking Arrow Does Not Trigger Combo Box Click Event

    Article ID: Q138902
    Creation Date: 30-OCT-1995
    Revision Date: 01-DEC-1996

    The information in this article applies to:

    • Microsoft Access versions 2.0, 7.0, 97

    SYMPTOMS

    Moderate: Requires basic macro, coding, and interoperability skills.

    The Click event for a combo box does not trigger when you click the arrow to drop down the combo box list, but it does trigger when you update the data from the keyboard without the mouse.

    CAUSE

    The Click event is not intended to trigger when the combo box arrow is clicked; it is intended to trigger only when an item is selected from the list. Because it also triggers when an item is selected without the mouse, it is not significantly different from the AfterUpdate event, although the AfterUpdate event happens first.

    STATUS

    This behavior is by design.

    MORE INFORMATION

    Steps to Reproduce Behavior

    1. Create a new form and add a combo box to it as follows:

            Form: Test1
            ---------------------------------
            Combo box:
               Name: Field1
               RowSourceType: Value List
               RowSource: "Abcde", "Fghij"
      
    2. Type the following code for the combo box's OnClick property [Event Procedure]:

            Private Sub Field1_Click()
               MsgBox "Click"
            End Sub
      
    3. Switch the form to Form view.
    4. Click the combo box arrow to drop down the combo box list. Note that the Click event does not happen.
    5. Select "Abcde" in the combo box list. Note that you receive the message "Click" as expected. In the message box, click OK.
    6. Type "f" in the combo box text box and press TAB. Note that you receive the message "Click."


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
©1997 Microsoft Corporation. All rights reserved. Legal Notices.

KBCategory: kbusage
KBSubcategory: FmsCmbo
Additional reference words: 2.00 7.00 97 8.00