Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2006
    Posts
    126

    Unanswered: combobox auto dropdown

    In Access 2003, Is there anyway of having a combo box automatically drop down the underlying list, without clicking the dropdown button, as soon as the user starts typing in the box? (e.g. similar to the google search box).

    I presume this would have to be done with an event procedure triggered by something like "on dirty". [ If that can be done, then there's the ancillary question of how to delete the dropdown button, since it would no longer be needed ]

    Pete
    PGT

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Normally you'd just drop it down when it gets focus:
    Code:
    Private Sub ComboBoxName_GotFocus()
      Me.ComboBoxName.Dropdown
    End Sub
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    May 2010
    Posts
    601
    Pete,


    Missinglinq's code will drop the the list. You also ask about makng it close. When the control has lost the focus, it will automatically close the drop down list.

    TIP: F4 toggles the drop down list when the control has the focus.
    Boyd Trimmell aka HiTechCoach HiTechCoach.com (free access stuff)
    Microsoft MVP - Access Expert
    BPM/Accounting Systems/Inventory Control/CRM
    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

  4. #4
    Join Date
    Jul 2010
    Posts
    6
    You could try a text box on top of a list box, instead of using a combo box. Set the list box to requery for every textbox.onchange which would populate your list as you type.

  5. #5
    Join Date
    Aug 2006
    Posts
    126
    Thanks to all. Missinglinq's one-liner was what I was looking for. I'd not found the Dropdown property when I was originally looking.
    Pete
    PGT

Tags for this Thread

Posting Permissions

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