This must be easy....

Ian Stuart

New member
Local time
Today, 07:45
Joined
Aug 27, 2003
Messages
6
I want to use a text box ("txtSearch") on a form to dynamically reduce the contents of a list box ("lstIssue")

The lstIssue data source is:

SELECT [tblIssue].[IssueNo], [tblIssue].[Description] FROM tblIssue WHERE ((([tblIssue].[Description]) Like "*" & [Forms]![frmSearchIssue]![txtSearch] & "*"));

which works fine.

I want to refresh the contents of the lstIssue as each key is pressed so that the contents of the list box reduce to only those containing the string in txtSearch.

Although I can do this by assigning the contents of the text box to a variable and vice versa after the refresh (which clears the contents of the text box) I need to know how to move the cursor to the end of the text and deselect it so that the next keypress doesn't overwrite the contents.

Which event is best to use and what function moves the cursor/ deselects text?

Any help gratefully accepted.
 
Perfect, thanks Fizzio
 

Users who are viewing this thread

Back
Top Bottom