Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Incremental Search


Message #1 by "Debidin Deepak" <nvkdssur@s...> on Tue, 21 Aug 2001 21:43:39 -0300
You can also use a timer for delaying the filter so that the filter can be
applied for a set of characters

----- Original Message -----
From: david adams <davidadams00@h...>
Sent: Wednesday, August 22, 2001 12:25 PM
Subject: RE: Incremental Search


> Dont know if it is "better", but I do the same thing with a grid and
textbox
> (on_change) except i set the recordset.filter property to LIKE the string
> value.
>
> this actually limits the list to values which match the input criteria.
>
> hope this helps.
> dav
>
> p.s. i always include a "reset" command button, which totally clears the
> textbox of data.  that way, the user doesnt have to "wait" while the
> on_change event fires for every backspace.  they clear the textbox and get
> the original unfiltered recordset with one "click".
>
> private sub txtsearch_change()
>
>   if ors.recordcount > 0 then
>
>     if trim(txtsearch.txt) = vbnullstring then
>
>       ors.filter = adfilternone
>       gridfill 'this function resets the datasource for the grid and
>                 performs a refresh.
>
>     else
>
>       ors.filter = "<Column Name> LIKE '" & trim(txtsearch.txt) & "*'"
>       gridfill
>
>     end if
>
>   endif
>
> end sub
>
> >
> >Wow this sounds pretty cool.  Do you have a demo I can try?
> >
> >-----Original Message-----
> >From: Debidin Deepak [mailto:nvkdssur@s...]
> >Sent: Wednesday, 22 August 2001 8:44 AM
> >To: professional vb
> >Subject: [pro_vb] Incremental Search
> >
> >
> >Dear VB Professionals,
> >
> >I frequently need a search screen in my applications...(I think everyone
> >does).
> >Most applications use a combobox or a listbox.
> >I try to give my users a more flexible interface. I usually put a
> >flexgrid control and hide a textbox behind it.
> >I transfer focus to the textbox everytime the flexgrid gets focus. on
> >the on_ change event of the textbox, I do a search and move the flexgrid
> >to the row with the patial match.
> >
> >Lets say you have a column with name and another with lastname,..the
> >user can swith column using the left and right arrow keys, and search on
> >name or lastname according to the current column.
> >
> >I like the way it works and I am trying to make an active X control with
> >these features.
> >"IS IT WORTH THE TIME ????"...or is there another control or easier way
> >to accomplish this incremental search.
> >
> >Any Suggestion,...even the smallest are really welcome
> >
> >
> >
> >Thank you in advance,...
> >Debidin Deepak

  Return to Index