Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting a Filter for searching
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01474568
Message ID:
01474583
Views:
34
>I want to set a filter for my search routine. I have a dropdown list of search orders that the user may select. As it goes through the LostFocus of the dropdown list for the search orders, there is a text box where the user types in the string to search.
>
>The search orders are by index, of course and they are:
>1. Part Number
>2. Project Name
>3. Customer
>
>I have some code in the Interactive part of the text box control that searches for every keystroke. However, I want to only show those records which have the same exact string through every keystroke.
>
>So, if the user types in a part number such as, "ABCDEF" and there are 3 records which being with "ABCDEF", let's say, then I want those records to show in my grid on the form. I want it to change (when there are matches) as the user types in more keystrokes. If this were a simple SQL statement, it'd be an easy one time shot, but this is using a filter and searching for every keystroke the user enters. How do you do this? If the userr has typed in "ABCDEF" and 5 records appear in the grid, I don't want to see any other records that don't match at least the first five characters.
>
>
>ABCDEF123
>ABCDEF435
>ABCDEF789
>ABCFGH120 < - - This one would not show up if the user had already typed in "ABCDEF" in the search text box control.
>
I think using the filter is limiting you.

Anyway, look at LIKE() function in Help to construct your filter (you will re-construct it every time and re-apply),
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform