[AccessD] Search as you type

Charlotte Foust charlotte.foust at gmail.com
Wed Apr 20 11:01:06 CDT 2011


Try using a disconnected ADO recordset and apply a filter to return
the limited recordset.  That should make the search fast because the
recordset is no longer connected to the back end.  What are you
planning to do if there are multiple results for the find?  The user
could actually edit the record if you require that and then you would
have to reconnect the recordset and update the source.  I have an old
demo on roger's access site that was built in 2000 (AFAIR) that uses
disconnected recordsets to load and update data.  You might have a
look at it and see if it gives you any ideas.  Watch out for a wrap.

http://www.rogersaccesslibrary.com/forum/foust-charlotte_forum14&SID=f27a794a-684c-f2495918-e4c25924-463bez2z.html

Charlotte Foust

On Wed, Apr 20, 2011 at 8:28 AM, Doug Steele <dbdoug at gmail.com> 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
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>




More information about the AccessD mailing list