Results 1 to 3 of 3
  1. #1
    NightWalker's Avatar
    NightWalker is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2016
    Location
    Midwest USA
    Posts
    253

    Long list combo box filter as entry is typed?

    I have a combobox that has a long list of items (over 100). I am trying to figure out a way to make the list smaller by typing characters into the combobox to make the list smaller to choose from. Is this possible and where would I look to get started? I have googled many things but I guess I am not typing the correct terminology to get what I am looking for.

    combobox = cbo_ProductionItemPartNumber


    table = tbl_ProductionItem
    field = ProductionItemPartNumber

    Thank you for any help to point me in the correct direction.

    Walker

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,895
    A few hundred items is not much, I have combobox with thousands of items in list.

    As you type in combobox, the list pointer will move to first item that matches the input. Make sure AutoExpand is set to Yes and the matched value will display in box. If you want records where the input is found anywhere in the field value, that is another matter. Review http://allenbrowne.com/ser-32.html

    Can use code to force the combobox dropdown to open when combobox gets focus.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    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
    Quote Originally Posted by June7 View Post

    ...As you type in combobox, the list pointer will move to first item that matches the input. Make sure AutoExpand is set to Yes and the matched value will display in box...
    And since Yes is the Default Setting for the AutoExpand Property...if it's not moving to the first partial match (and you didn't mistakenly set the Property to No) you'd have to consider the possibility that the Combobox is corrupted.

    Although we usually think of Forms, and even entire Databases, when we speak of corruption, Controls, such as Comboboxes, can and do become corrupted, and seem particularly susceptible to this during app development. The test/cure for this is short and simple...delete the Control and then re-create it.

    As for automatically dropping down the list, as June7 suggested, when entering the Combobox, to make the first few matched immediately visible, that's easy...replacing cboComboName with the actual name of your Combobox:

    Code:
    Private Sub cboComboName_Enter()
      cboComboName.Dropdown
    End Sub
    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Combo Box Filter from List Box Results
    By UTLee in forum Access
    Replies: 2
    Last Post: 08-16-2017, 07:29 PM
  2. Filter Former Employees out of Combo Box List
    By millerprm in forum Access
    Replies: 3
    Last Post: 10-29-2014, 10:28 AM
  3. Replies: 13
    Last Post: 06-04-2014, 10:44 AM
  4. Entry is too long for Combo box
    By EinSpringfielder in forum Forms
    Replies: 1
    Last Post: 03-08-2012, 09:27 AM
  5. Combo box/list for data entry.
    By geoffishere in forum Forms
    Replies: 1
    Last Post: 03-13-2010, 04:16 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