How to add an auto-complete textbox control to an MS Access Form?
Posted on 2005-04-25
Hi, in Access 2000, as text is typed into a text control, I would like to display a list of matching words populated from a 'lookup' table. Each time another character is typed, the list should be filtered accordingly. At any point, the user should be able to select from the list of matching words. Ideally, the same function should apply to every word that is typed in the text box, i.e., every time a space is detected. Alternatively, the selected word could be appended to a string in another textbox.
I have found similar functions for VB 6.0 and VB.net, but they don't seem to translate to MS Access.
The textbox should not flicker as each letter is typed.
Here's an example of what I am looking for:
If the lookup table contains the following words "Ape", "Apex", "Apple", if the user types "A", all three words would appear in a select list. When the user adds the letter "p", i.e., "Ap", all 3 words still display. When the user adds the letter "e", i.e., "Ape", only "Ape" and "Apex" appear. The user may then select from the list to chose "Apex". A space key is pressed and the user types "a", and again all 3 words would be displayed.