Searching / Auto Completion in combo box

G

Guest

Here's what I have at the moment. I have two relevant tables, People and Memberships. People is essentially a fancy phonebook. A person is allowed to have multiple memberships, so People.ID is a foreign key into Memberships.

Now, I have in my Memberships form, a three-column combo box, with the row source property as:

SELECT People.ID, People.[Last Name], People.[First Name] FROM People;

and After Update Event as:

[Person ID].Value=[Person ID].Column(1)

In the Memberships table, Memberships.Person ID is a lookup to People.ID.

So that I don't have to remember each person's ID. OTOH, there are almost a thousand people in People and I really don't want to scroll down the combo list for each one. Is there some way I could start typing the last name and it would do the completion for me? Note that last name is not unique, but Last Name + First Name is (as it happens).

I've set the Auto Expand property of the combo box to Yes, but this doesn't seem to do anything.

Thanks muchly in advance!

Glenn
 
A

Albert D. Kallal

Try settting the sort order of the combo..then the auto completion should
work.
SELECT People.ID, People.[Last Name], People.[First Name] FROM People order by [Last Name];
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top