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

Filter as you type?

Status
Not open for further replies.

menstroy

MIS
Jun 2, 2003
63
US
Hello,

I would like to have a text box that acts as a realtime search.

I am using the filter feature, but I am not having much luck with the events as far as when one kicks off.

I would like a textbox that allows the user to type in somebodies last name and it would apply that filter as they type each letter. My current filter is

DoCmd.ApplyFilter , "AddyLastName like '" & LastName.Value & "*'"

This works fine, but if I put it in after update event it only kicks off when the user hits enter, I would like it to kick off after each letter is pressed.

Please advise!

thanks!
 
On downkey? Are you saying I should exicute the filter at the point? I think the filter would only grab the value after the record is updated, and it is not updated until an 'ENTER' is pressed or, the record is saved, or the field losses focus.

That is the problem I having, I want to have it update the value after each character is typed, and then apply the filter.
 
Hi!

Put the filter in the text box's Change event and use LastName.Text instead of LastName.Value. That should give you what you want.

hth


Jeff Bridgham
bridgham@purdue.edu
 
"i would apply that filter as they type each letter" is what you said in your post. In any case, you have to have some type of event that tells the computer you are finished collecting data. What would that be in this case?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top