Dropdown, two columns, search both

chellebell1689

Registered User.
Local time
Yesterday, 20:46
Joined
Mar 23, 2015
Messages
267
Hello,

I have a drop down box with two columns (FirstName, LastName) and currently I start typing in it and the drop down scrolls down the to first name that matches (only looking at the first name). What I would like is to be able to start typing a name and it looks at both the first name column and the last name column. (Also, if it's do able, I'd like to only see the names that match instead of it just scrolling to the first name that matching and showing all the non-matching names.)

Thank you in advance for the help & let me know if you need more info.
 
Concantenate with colums in your combo box oe use 2 combo boxes.
 
I think it might be easier to just use two combo boxes, not sure why I didn't think of that. XD Thanks!
 
Sorry, I have another question. How can I make it filter when I start typing? So that if I type "Susie" it only shows and/all "Susie"?
 
Set the combo box "Auto Expand" property to "Yes."
 
It is set at "yes", but it still shows everyone on the list, not the ones that match what is being typed.

i.e.
I type "S" - List only shows names that start with "S"
I type "Su" - List only shows names that start with "Su"
etc.
 
That's what it's supposed to do. If you want to see the list use, i.e. part of it. I recall that the number of rows to display is a property of th comboboxname control. If thousands of rows are in the data set, other strategies may be appropriate.

me.comboboxname.dropdown on comboxname.gotfocus

For details look here: http://tinyurl.com/o6sqk45
 
Sorry my brain is a little slow today. When you say "That's what it's supposed to do", are you saying it's suppose to show everyone in the list or it's suppose to filter like my example?

It currently shows everyone (even if their name does not match what is being typed); I want it to only show the names that match what is being typed.

Sorry again if it should be obvious, it's one of those days...
 
It filters like your example, but unless you "dropdown" a partial list is not displayed.
 
It's not doing that for me...I attached a picture to show what it is doing.
 

Attachments

  • Dropdown.jpg
    Dropdown.jpg
    89.8 KB · Views: 59
Why aren't the names in your combo box sorted? Change the RowSource of the combo box to sort appripriately (alphabetically) by 1st name.
 
That's what I needed! Thank you!

I had it sorted by last name because at first I wanted to be able to look up someone by first and last name via one drop down, but found out it's better to just have one box for each search. Thank you again!
 

Users who are viewing this thread

Back
Top Bottom