down arrow on combo box requires two clicks to open

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tidal pool
    New Member
    • Jun 2014
    • 2

    down arrow on combo box requires two clicks to open

    I include code for data entry that causes the combo boxes to open On Enter : <cboName>.dropd own. This works fine and the combo boxes also open if I click within the box (On Enter). However, with this configuration, I need to click the box's down arrow twice. I can see the box gets opened but then closed again with the first click. The subsequence click results in the box opening and staying open. If I step through the code, it also remains open on one click on the arrow. Can someone tell me what is going on here?
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32633

    #2
    Clicking on the arrow counts as entering the control.

    Click on arrow --> Runs code to drop the box down --> Recognises the arrow is clicked so toggles the box back up again --> Second click doesn't trigger the OnEnter procedure as focus was alreay at the control so drops the box down.

    Comment

    • tidal pool
      New Member
      • Jun 2014
      • 2

      #3
      Is there a solution to get around this? I need the box to dropdown OnEnter, but also need folks to be able to click the dropdown arrow without having to click it twice.

      Comment

      • twinnyfo
        Recognized Expert Moderator Specialist
        • Nov 2011
        • 3653

        #4
        tidal pool,

        Instead of using the OnEnter Event, use the OnGotFocus Event. I tested this and when I tab into the Combo Box, it expands and when I click on the Combo Box (whether in the text field or the down arrow), it expands.

        Hope this hepps!

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32633

          #5
          Nice answer Twinny. Not had time to look into it and you'ved saved me a job :-)

          Comment

          Working...