Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Complete Text Box Using Information From the Database

Status
Not open for further replies.

debbie1212

Programmer
May 31, 2000
66
US
I have a field in a form that I would like to automatically start showing a list of the items that exist in the database that begin with the characters they have started typing in like the auto complete feature in Windows Explorer. But instead of showing entries the user typed recently like IE does, it would display the entries in the database.

In other words, they type in the letter "b" and it then looks like a drop down list box that displays the items that begin with a "b". The user can then select the one they want rather than typing the whole name and taking a chance on typing it in incorrectly. If they have already typed in "br" it would narrow the list to those that begin with "br".

It sounds like I would need to run the query against the database when it opens the page so that the information would be ready when they start typing. Then would I use a javascript to check the characters typed against the recordset?

There are currently only about 100 entries in the database so when they type a letter it would only display anywhere from 1 - 15 items.

It would probably be too slow to wait and have it run the query when the user starts typing. Or is that how it is done?

I'm sorry if this question has been asked and answered before. I saw one question similar but the responses were geared towards another problem the person mentioned
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top