jwcolby
jwcolby at colbyconsulting.com
Wed Apr 20 11:03:00 CDT 2011
In the onchanged event of the text box you can set a form timer to fire X ticks later. Every time the onchanged fires the timer is "reset" to be x ticks out. When the timer fires, reset the timer to not fire ( a value of 0 ticks I think) and then go do the search. Each tick is a millisecond so set it for 1000 to get a 1 second delay. Something like that. John W. Colby www.ColbyConsulting.com On 4/20/2011 11:28 AM, Doug Steele wrote: > I've built a form with a live search box so that a client can enter > any text to search (on one field only) and the form redisplays with > the matching records. My first attempt is to use the 'OnChanged' > event in the search text box and re-filter the form using a filter > "Name like '*xxxx*'. This works well enough on my local machine, but > on the client's network there is an annoying pause after each > character is typed. My ideas on speeding this up are: > > 1. Only re-filter when the typing pauses for, say, half a second. > Usually a search is done by entering a few characters quickly, like > 'Bill', then waiting to see the results. I can't quite figure out how > to do this, though. > 2. Use ADO for the form recordset, to avoid network traffic. > > Any suggestions? > > Thanks, > Doug