Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2010

    Question Unanswered: Combobox - Auto Filters When User Types Criteria


    I have searched the forum but couldnt find what I was looking for.

    I have a combobox (populated from a query) on a form which has several hundred product descriptions. When the user starts typing any part of a product description I want the combobox to filter out products that dont contain what the user has entered, they could then click on the product they want.

    If you can point me in the right direction I'd really appreciate it.

    Thanks in advance.

  2. #2
    Join Date
    Jul 2004
    South Dakota
    Have you played around with the LimitToList and AutoExpand properties? I think AutoExpand is what you are looking for. Just set it to Yes and it will filter the list based on what is being typed in.


  3. #3
    Join Date
    Mar 2010
    Thanks for the update.

    I found the following site with exactly what I wanted. All you need to do amend the code from this site:

    How Do I Set Up Find As You Type In A Combo Box? - Microsoft: Access Forms FAQ - Tek-Tips


  4. #4
    Join Date
    Dec 2004
    Madison, WI
    IF this is where you want it to search after each character is typed (versus using the typical combobox default where it auto-fills as you type), this method is rarely recommended due to the toll it takes on the form/table with large recordsets. If for example, you're doing this on a 100,000+ recordset, you'll find it to work somewhat slow, especially since the benefits don't really out-weigh the cons (ie. the user types into the combobox and it auto-fills as they type versus having it requery the records after each character is entered, sometimes pausing for 2-3 seconds after each character.) If you throw in other factors such as a slow network for example, you'll find users screaming to have it changed (I've been there, done this, and would only recommend this method for small recordsets.) Again though, this is where you use the OnChange event so it queries after each character versus letting the combobox do it's normal thing (which doesn't require any coding.)

    I personally prefer the alphabetical search example in the code bank.
    Last edited by pkstormy; 04-27-10 at 20:08.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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