Results 1 to 2 of 2
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Niagara Falls, New York, USA
    Thanked 0 Times in 0 Posts

    Select a Whole Combo Field? (A2k (9.0.3821) SR-1)

    Select a Whole Combo Field?

    A2k (9.0.3821) SR-1

    I have a combo box on a form.

    I have Tools, Options, Keyboard, Behavior, Select Entire Field is checked.

    This combo has a NotInList event for handle new entries.

    This combo also has an On Double Click event to handle changes to combo entries.

    The behavior I want:

    If the user mouse clicks in the middle of the word in the combo box, I want the entire field to be selected so user can simply type the first few characters of the new value their looking for in the combo list.

    I have the following in On Mouse Up and it seems to work.

    Private Sub strDEAR_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Me!strDEAR.SelStart = 0
    Me!strDEAR.SelLength = Len(Nz(Me!strDEAR))
    End Sub

    I originally had this code in On Click event and it didn

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Crystal Beach, FL, Florida, USA
    Thanked 40 Times in 39 Posts

    Re: Select a Whole Combo Field? (A2k (9.0.3821) SR-1)

    Usually you would want your code in the OnEnter event.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts