Results 1 to 6 of 6
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919

    Combo box On Dbl-Click event not firing

    I have a combo box with two events enabled, Click and Dbl-Click. I cannot get the latter to fire. I put a stop on the OnClick and it fires whenever I double-click a list item. I don't have double-click problems elsewhere in the app. What might I be missing?

  2. #2
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    The OnClick event fires, on a Combobox, anytime a selection is made. Testing shows that the DoubleClick event only fires when it's done in the empty text box of the Combobox.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Okay, so much for that approach.

    I was also trying to make a distinction of a selection if the Ctrl key was down when the OnClick fired so I could take special action on the detect. I thought I could do that with the OnMouseDown but the list item doesn't seem to be available at that time. I.e., Me.cboDescription.Column(0) returns blank in the OnMouseDown event but I do get the text of the detected item in the OnClick event. So, what would be the test in the OnClick event to test for the Ctrl key being down when the item was selected?

  4. #4
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Got it.........

    In the OnClick event.................
    If vbKeyControl then "Take the special action I need"

  5. #5
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Well, that was dumb! I need to know if the control key "is down" when the user clicks on one of the combo choices.

  6. #6
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    I put the following code in the MouseDown event for the combo box. The text of the item selected is not available "yet" so I set a "pending" variable so the AfterUpdate of the receiving control can take the pending action at that time.

    Not sure this is the most appropriate approach but 2017 is rapidly approaching and this item needs to get done........

    Code:
    Private Sub cboDescriptions_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    '========================================================================================
    ' See if control key down at time of selection.
    '========================================================================================
    If (Shift And acCtrlMask) Then bolDFltPending = True
    
    End Sub

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Combo Box On Click Event does not fire
    By GraeagleBill in forum Forms
    Replies: 7
    Last Post: 10-30-2015, 01:20 PM
  2. On Click Event with a combo box
    By PRHoff in forum Forms
    Replies: 4
    Last Post: 02-27-2015, 06:18 PM
  3. Replies: 2
    Last Post: 03-26-2014, 07:30 AM
  4. Combo box on click event
    By crowegreg in forum Forms
    Replies: 13
    Last Post: 08-17-2012, 08:25 PM
  5. tab control - firing a page on-click event
    By Chuck55 in forum Programming
    Replies: 7
    Last Post: 05-01-2012, 09:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums