Search Combo Box

MelissaMuz

New member
Local time
Today, 19:40
Joined
Oct 18, 2022
Messages
27
Hello, I was wondering if there is a way to start typing the part name (on the right of the combo box), rather than the part code and have the database find the part I am looking for. I would like it to be stored as the code but searching for the part by name is sometimes much easier.
 

Attachments

  • AccessSS.png
    AccessSS.png
    183.2 KB · Views: 131
google 'access vba FAYT' (Find As You Type), plenty of examples out there
 
here is also a demo.
open OrderForm and on "Part Code" field, start typing the Part Code or Part Name
you need to search.

view the code of the form (Load event) how to setup the Part Code combobox.
 

Attachments

@MajP here has a FAYT set of classes, so search here as well.
 
Last edited:
 
If you don't need to see the number, you can hide the column, OR you can swap the order of the columns in the RowSource so the number is second. In either case add a sort ascending for the text field. If you don't sort the text field, the type ahead will NOT work correctly

If you swap the columns, you also need to change the number of the bound column from 1 to 2..
 

Users who are viewing this thread

Back
Top Bottom