Find as you typed (1 Viewer)

hfsitumo2001

Member
Local time
Today, 05:13
Joined
Jan 17, 2021
Messages
365
In my form here attached I have 2 combo box, to fill the bound fields. Right now the source of the combo is table. This is the control source of the field:
Code:
SELECT DISTINCT Inventory.ItemCode, Inventory.[IUnitPrice], Inventory.Description FROM Inventory ORDER BY Inventory.Description;
How can I make it "find as you typed" not just the beginning of the description, but any part of the description, it will auto narrow selection to the closest names then we choose it.
Findasyoutyped..jpg
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 20:13
Joined
May 7, 2009
Messages
19,230
i also have my version.
 

Attachments

  • agpComboboxFilterAsYouType.accdb
    612 KB · Views: 256

hfsitumo2001

Member
Local time
Today, 05:13
Joined
Jan 17, 2021
Messages
365
I do this often so I use class module fo reuse
Post in thread 'Find as we typed' https://www.access-programmers.co.uk/forums/threads/find-as-we-typed.315813/post-1743564
MajP, the problem is that mine is the filter is the bound coctrol source, while the samples that I got from this forum is unbound. Do you have the sample with the bound control source, which is part of the fields in the linked tables.. See below my form in the design view. Marked in red are the fields that I want to select. Right now it is working by typing part of the beginning of the data. What I want is any part of the data, will show to the closest one, that is the way of " find as you typed" that I want.
control source.jpg
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 08:13
Joined
May 21, 2018
Messages
8,525
I asked you the same question as before, did you try it? There is no difference between bound and unbound in how this works. However the bottom form is continuous. In a continuous form you cannot restrict the values in the combobox because it will remove that from all innstances of the comobox. This is not unique to a FAYT. In this case you lay a textbox over the combox. This trick is done on cascading combox as well

Here is a bound. Notice the textboxes over top of each combo.
 

Attachments

  • FAYT Bound.accdb
    1.3 MB · Views: 294
Last edited:

hfsitumo2001

Member
Local time
Today, 05:13
Joined
Jan 17, 2021
Messages
365
I asked you the same question as before, did you try it? There is no difference between bound and unbound in how this works. However the bottom form is continuous. In a continuous form you cannot restrict the values in the combobox because it will remove that from all innstances of the comobox. This is not unique to a FAYT. In this case you lay a textbox over the combox. This trick is done on cascading combox as well

Here is a bound. Notice the textboxes over top of each combo.
Thank MajP, I will try it
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 08:13
Joined
May 21, 2018
Messages
8,525
FYI the textbox trick is only needed on continuous forms. If you get stuck you can post a sample DB.
 

Users who are viewing this thread

Top Bottom