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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deselecting text in a combobox 1

Status
Not open for further replies.

iojbr

Technical User
Feb 12, 2003
129
US
Hi:

I am using a textbox to dynamically limit results in a list box (list2). I want the listbox to requery after every letter typed into the text box. I tried to do this using the OnChange event of my textbox and I can almost get it to work. I used the Me.list2.requery followed by Me.refresh commands to get the appropriate selections to appear in the listbox. But the refresh command creates a problem because it highlights the textbox entry, so if I try to type the next letter, it overwrites everything instead of adding a character. Is there some code to deselect everything in the textbox that I can type in?

Thanks for your help in advance.
 
Hi
You could try something like:
Code:
Me!txtBox.SelStart = (Len(Me!txtBox))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top