Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting a Filter for searching
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Setting a Filter for searching
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01474568
Message ID:
01474568
Vues:
96
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform