Search Combo Box (1 Viewer)

MelissaMuz

New member
Local time
Today, 14:06
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: 74

CJ_London

Super Moderator
Staff member
Local time
Today, 14:06
Joined
Feb 19, 2013
Messages
16,616
google 'access vba FAYT' (Find As You Type), plenty of examples out there
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:06
Joined
May 7, 2009
Messages
19,245
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

  • sampleSearchCombo.accdb
    608 KB · Views: 102

Gasman

Enthusiastic Amateur
Local time
Today, 14:06
Joined
Sep 21, 2011
Messages
14,311
@MajP here has a FAYT set of classes, so search here as well.
 
Last edited:

MajP

You've got your good things, and you've got mine.
Local time
Today, 09:06
Joined
May 21, 2018
Messages
8,529
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 09:06
Joined
Feb 19, 2002
Messages
43,293
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

Top Bottom