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!

OnKeyUp event on Text box... Autosuggest possible??

Status
Not open for further replies.

stephenmbell

IS-IT--Management
Jan 7, 2004
109
US
I am trying to do something similar to an autosuggest box.

Basically, it is a text box used to search the database.

as the user enters the search term, i want to update the rowsource property of a corresponding listbox...

in the keyup event of the text box i am creating a dynamic sql string -- if a user were to type test my procedure would execute four times generating the following:

select field from table where field like '*t*'

select field from table where field like '*te*'

select field from table where field like '*tes*'

select field from table where field like '*test*'

.....

the problem is... the text box doesnt appear to actually have a value until the box loses focus?!?!?


is there some way to accomplish what I would like to do?

any help is greatly appreciated.

thanks in advance
sb
 
Check the text property of the textbox:

" ... Like " & Me.txtTexboxName.Text
 
Thank you

much appreciated

i should have figured that one out :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top