Is Autocompletion Possible?

  • Thread starter Thread starter Faraz Ahmed Qureshi
  • Start date 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.
 
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.
 
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?
 
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.
 
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.
 
Back
Top