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

"Quick Search" function... need a little VBA help...

Status
Not open for further replies.

Woodman650

Technical User
Jan 20, 2005
92
0
0
US
Hey guys,
I've got a listbox that is filtered down depending on the values a user puts into an input box, on-the-fly. However, the requery onchange doesn't allow users to add spaces to the search field.
I'm using the code:
Code:
Private Sub textText_Change()
Me.lstList.Requery
Me.Recalc
Me.txtText.SelStart = Len(Me.txtText.Text)
End Sub
Now, I'm pretty certain the Recalc function is what is giving me the problem... but I'm wondering how I can't rework the code to accomodate a user entering a space value in their string. Any ideas? thanks!
 
meaning... when you hit the spacebar on your keyboard, the blinking cursor moves forward a space. instead, it gets moved back and a user cannot insert spaces into their query. Instead of typing "a word here", they can only type "awordhere" and the results don't come up accurately. thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top