We help IT Professionals succeed at work.

A better solution than "combos" required

Patrick O'Dea
on
Hi,

I tend to use combos to allow my users to find their required data via a "drop down".
This works find if there are not too many results in the drop down.

However, I would like to provide the users with a "string search" facility (if easy).

Example;
I have 10,000 names in a tblCustomers.CustomerName.
If I type "smith" then all customers containing the string "smith" will be displayed.

At present I achieve the above by allowing the users to Cntrl+F on a continuous form.  However, this is not elegant.

Can anyone point me to a neater solution?
Comment
Watch Question

Well a very popular solution is below by Allen Browne:
http://allenbrowne.com/ser-62.html

Hope this helps,
Daniel
Database Architect / Application Developer
Top Expert 2007
Commented:
I suggest you check out this excellent EE article on exactly that subject. This is optimized for large recordsets:


http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_6490-Search-While-You-Type-in-a-ComboBox.html

mx

Author

Commented:
Thanks folks,

This is very much what I was looking for.

Now all I have to do is my home work and actually study/understand each line of code!

THanks again.
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
Top Expert 2007

Commented:
21Dewsbury:
Check out Harfang's other articles as well ... GREAT stuff.  

mx