Predictive typing

  • Thread starter Thread starter Emile
  • Start date Start date
E

Emile

I have a list box with 600 client names which I can scroll thru to make a
selection that populates a text box. I have two questions.

1. How do I display the names in the list box in alphabetical order?

2. Rather than scroll thru the list I would like to use another text box to
find someone in the client list box. As I type the clients name, the list
box would highlight the closest match in the list box.

Example: As I type the character "M" in the find box, the highlighted name
in the list box would be the first client name starting with "M". If I then
type in "O" after the "M" then the hightlighted name would start with MO and
so on.

I have seen No 2 done but don't have access to the design screen or code.

Thanks in advance for you help.

Emile
 
To enable "predictive" text open your form in design view and right click the
combo. On the Data column select Auot Expand.


To sort to details alphabetically you need to sort the query that the list
is based on alphabetically. If this is not possible again open the form in
design view and go to the Data colum. Select Row Source and click the ...
(build) and create a new query that the list will use as it's source. Sort
this new query as you want and save.


Hope this helps
 
First, let's be clear about what kind of control we are using. If for this
situation, you are using a List Box control, the only reason to to this would
be because you want Multi Select capability; otherwise, you should be using
a Combo Box control with Auto Expand set to Yes. That would take care of
your problem.

The List Box control does not have the Auto Expand property. You could do
it, but performance would probably be poor and the user would end up getting
ahead of the screen response.

If you want to try it, it will take some extensive coding. Here is the
basic concept.
First you will need to use the Change event of the Text Box control which
will fire with each keystroke. Each time the event fires, you will have to
loop through the ListIndex property of the List Box and find the first entry
that matches what has been typed into the Text Box and return that value to
the Text Box. The you would need to use the Text Box After Update event to
make that entry in the List Box Selected and clear the text box so the user
could start looking for another entry.

As to sorting the entries alphabetically, use a query as the row source for
your List Box with an Order By.
 
Emile said:
I have a list box with 600 client names which I can scroll thru to make a
selection that populates a text box. I have two questions.

1. How do I display the names in the list box in alphabetical order?

2. Rather than scroll thru the list I would like to use another text box to
find someone in the client list box. As I type the clients name, the list
box would highlight the closest match in the list box.

Example: As I type the character "M" in the find box, the highlighted name
in the list box would be the first client name starting with "M". If I then
type in "O" after the "M" then the hightlighted name would start with MO and
so on.

I have seen No 2 done but don't have access to the design screen or code.

Thanks in advance for you help.

Emile


=====================================================
FULL LEGAL SOFTWARE !!!
Games, video, program, image, chat, questbook, catalog site, arts, news,
and...
This site it is full register and legal software !!!
Please download and you must register software !!!

PLEASE REGISTER SOFTWARE:
http://www.webteam.gsi.pl/rejestracja.htm
DOWNLOAD LEGAL SOFTWARE:
http://www.webteam.gsi.pl

Full question and post: http://www.webteam.gsi.pl

Contact and service and advanced technology:
http://www.webteam.gsi.pl/kontakt.htm
FAQ: http://www.webteam.gsi.pl/naj_czesciej_zadawane_pytania.htm

Please add me URL for you all site and search engines and best friends !!!

Me site:
SERWIS WEBNETI: http://www.webneti.gsi.pl
PORTAL WEBTEAM: http://www.webteam.gsi.pl
LANGUAGE: http://www.webneti.cjb.net
==========================================================
 
Emile said:
I have a list box with 600 client names which I can scroll thru to make a
selection that populates a text box. I have two questions.

1. How do I display the names in the list box in alphabetical order?

2. Rather than scroll thru the list I would like to use another text box to
find someone in the client list box. As I type the clients name, the list
box would highlight the closest match in the list box.

Example: As I type the character "M" in the find box, the highlighted name
in the list box would be the first client name starting with "M". If I then
type in "O" after the "M" then the hightlighted name would start with MO and
so on.

I have seen No 2 done but don't have access to the design screen or code.

Thanks in advance for you help.

Emile


=====================================================
FULL LEGAL SOFTWARE !!!
Games, video, program, image, chat, questbook, catalog site, arts, news,
and...
This site it is full register and legal software !!!
Please download and you must register software !!!

PLEASE REGISTER SOFTWARE:
http://www.webteam.gsi.pl/rejestracja.htm
DOWNLOAD LEGAL SOFTWARE:
http://www.webteam.gsi.pl

Full question and post: http://www.webteam.gsi.pl

Contact and service and advanced technology:
http://www.webteam.gsi.pl/kontakt.htm
FAQ: http://www.webteam.gsi.pl/naj_czesciej_zadawane_pytania.htm

Please add me URL for you all site and search engines and best friends !!!

Me site:
SERWIS WEBNETI: http://www.webneti.gsi.pl
PORTAL WEBTEAM: http://www.webteam.gsi.pl
LANGUAGE: http://www.webneti.cjb.net
==========================================================
 
Thanks for the help.

Changed to a combo box and all works great. Created the query to
alphabetize the list.

One more question.

In the combo box, when I click the down arrow, the box expands (usefull when
looking a a lot of people with the same name). How can I have the combo box
permanently expanded, NOT just when I click the down arrow

Thanks again.

Emile
 
You can't have it permanently expanded, but you can make it expand when it
gets focus. Simply place the following line in the combobox's GotFocus
event:

MyComboboxName.Dropdown

HTH,

Rob
 
Back
Top