Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: surinder singh
  Where is surinder singh?
 mumbai
 India
 surinder singh
 To: Arvin Mendoza
  Where is Arvin Mendoza?
 The Fort
 Philippines
 Arvin Mendoza
 Tags
Subject: RE: incremental search with textbox
Thread ID: 299723 Message ID: 299732 # Views: 48 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Monday, March 28, 2011 9:20:17 AM         
   


> > how to create a incremental search with textbox
> >
> > when i type something in the textbox( interactive change ) a list box OR Grid should appear with
> >
> > the searched value
> >
> > as i type the value in textbox the list box OR grid should show the result
> >
> > my preference is to use List box for this
> >
> >
> > warm regards,
> > mk.
>
> Hi Mk,
>
> I hope this could give you an idea.
>
> Assuming you have a textbox and a listbox and these records....
>
>
> CREATE CURSOR curNames(fname c(30))
> INSERT INTO curNames values('JAWORSKI, ROBERT B.')
> INSERT INTO curNames values('MENDOZA, ARVIN P.')
> INSERT INTO curNames values('MENESES, VERGEL S.')
> INSERT INTO curNames values('MISOLAS, DENNIS M.')
> INSERT INTO curNames values('MORALES, VICKY D.')
> INSERT INTO curNames values('MUMAR, CONNIE R.')
> INSERT INTO curNames values('RICO, NANCY V.')

>
> At your TextBox InteractiveChange type this...
>
>
> SELECT * FROM curNames WHERE LEFT(fname,LEN(ALLTRIM(This.Value)))==UPPER(alltrim(This.Value)) ;
> INTO CURSOR curFiltered
> Thisform.List1.RowSource=[curFiltered]
> Thisform.List1.RowSourceType=2

>
>
> Regards,
>
>
> Arvin P. Mendoza
> Philippines
> "Let others praise you and never ever praise yourself. Being confident is different from being arrogant and calling yourself one of the best is being arrogant!"


I think it will be equavalent to FILTER, and in case if user leaves the textbox and tries to find values in LIST directly by typing in LISTBOX then he will be seeing limited records and he could have to come back to TEXTBOX and
delete all the text to see other values in LISTBOX.


-----------------------------------------------------------------------------------------------
Regards
Surinder Singh
Email: sur200@indiatimes.com
Check my blog for details: http://weblogs.foxite.com/sur200
----------------------------------------------------------------------------------------
*Everything is possible but everything is not required to be happy..

COMPLETE THREAD

incremental search with textbox Posted by mk sharma @ 3/28/2011 8:18:16 AM
RE: incremental search with textbox Posted by surinder singh @ 3/28/2011 8:21:17 AM
RE: incremental search with textbox Posted by mk sharma @ 3/28/2011 8:55:56 AM
RE: incremental search with textbox Posted by surinder singh @ 3/28/2011 8:58:19 AM
RE: incremental search with textbox Posted by Rahul Moudgill @ 3/28/2011 10:11:07 AM
RE: incremental search with textbox Posted by SHAHERYAR RASHED @ 3/28/2011 9:39:03 AM
RE: incremental search with textbox Posted by mk sharma @ 3/29/2011 6:16:31 AM
RE: incremental search with textbox Posted by Arvin Mendoza @ 3/28/2011 9:11:54 AM
RE: incremental search with textbox Posted by surinder singh @ 3/28/2011 9:20:17 AM
RE: incremental search with textbox Posted by Arvin Mendoza @ 3/28/2011 10:01:59 AM
RE: incremental search with textbox Posted by Russell Hill @ 3/28/2011 9:57:58 AM
RE: incremental search with textbox Posted by Rahul Moudgill @ 3/28/2011 10:07:23 AM
RE: incremental search with textbox Posted by Glenn Gevero @ 3/28/2011 10:42:50 AM
RE: incremental search with textbox Posted by Jijo Pappachan @ 3/29/2011 9:29:32 AM
RE: incremental search with textbox Posted by mk sharma @ 3/31/2011 12:17:16 PM
RE: incremental search with textbox Posted by Jijo Pappachan @ 3/31/2011 12:46:29 PM
RE: incremental search with textbox Posted by mk sharma @ 3/31/2011 6:43:55 PM
RE: incremental search with textbox Posted by mk sharma @ 3/31/2011 6:58:47 PM