Is Autocompletion Possible?

  • Thread starter Faraz Ahmed Qureshi
  • Start date
F

Faraz Ahmed Qureshi

I want to have a sort of autocompletion be available so as to help in
completing a field, if recording any entry similar to already existing one,
only at a few clicks, instead of inserting a Full Name everytime.
 
W

warren knowles

Faraz Ahmed Qureshi said:
I want to have a sort of autocompletion be available so as to help in
completing a field, if recording any entry similar to already existing
one,
only at a few clicks, instead of inserting a Full Name everytime.
 
F

Faraz Ahmed Qureshi

Thanx DJ

The only reason is that How can I have a combo made up of the field itself?
In other words it seems quite wierd to have a field like Full_Name being
presented in a combo manner showing not even a single entry at the first
records. Having a code to record new entry be added to the combo box
everytime. However, in case of a case being repeated, presenting only the
unique names only once?
 
D

Douglas J. Steele

Are you concerned that the combo box won't have anything in it if the table
doesn't have anything in it? How is that any different than having a text
box?

You can set the RowSource property of the combo box to

SELECT DISTINCT Full_Name
FROM MyTable
ORDER BY Full_Name

Remember that you need to set the combo box's LimitToList property to True,
and put code in its NotInList event to add new entries to the table.
 
D

David W. Fenton

You can set the RowSource property of the combo box to

SELECT DISTINCT Full_Name
FROM MyTable
ORDER BY Full_Name

Probably better to have:

SELECT DISTINCT Full_Name
FROM MyTable
WHERE Full_Name Is Not Null
ORDER BY Full_Name

Otherwise, you end up with a blank entry in the dropdown list, which
does nobody any good.
 

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