S
Steven
I have a form with an unbound textbox and a listbox. I want to requery the
listbox object with each keystroke in the textbox. The listbox's record
source is a query that has a criteria in the ClientName Field of -- Like
ReturnValue(). ReturnValue() should return what is currently showing in the
textbox surrounded with "*". I am trying to capture what is being typed in
the textbox with the KeyDown Event of the textbox and using KeyCodes to build
a string. For Example if I open the form and enter the textbox and type the
letter "a" then KeyDown will start making a Variable of *a* (using KeyCode
testsing) and the listbox will requery showing all clients with an "a" in the
Name. And then if I type a "t' then in the KeyDown Event the Variable will
be *at* and requery the listbox to show all Names Like *at* etc. Building
this Variable is very cumbersome but I cannot get the Value of the textbox
because it does not have a value until updated. Is there a faster. easier
more straight forward way to return what is being typed in the textbox? I
want the incremental search on the LIKE criteria to occcur with each key
stroke. I guess the bottom line question is how do you return the string
showing in a textbox with each keystroke ie before the textbox is updated?
I hope this is clear.
Thanks for your help.
listbox object with each keystroke in the textbox. The listbox's record
source is a query that has a criteria in the ClientName Field of -- Like
ReturnValue(). ReturnValue() should return what is currently showing in the
textbox surrounded with "*". I am trying to capture what is being typed in
the textbox with the KeyDown Event of the textbox and using KeyCodes to build
a string. For Example if I open the form and enter the textbox and type the
letter "a" then KeyDown will start making a Variable of *a* (using KeyCode
testsing) and the listbox will requery showing all clients with an "a" in the
Name. And then if I type a "t' then in the KeyDown Event the Variable will
be *at* and requery the listbox to show all Names Like *at* etc. Building
this Variable is very cumbersome but I cannot get the Value of the textbox
because it does not have a value until updated. Is there a faster. easier
more straight forward way to return what is being typed in the textbox? I
want the incremental search on the LIKE criteria to occcur with each key
stroke. I guess the bottom line question is how do you return the string
showing in a textbox with each keystroke ie before the textbox is updated?
I hope this is clear.
Thanks for your help.