FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WEBDEV 2024
→
Search any string in a table
Search any string in a table
Débuté par JoseM, 30 oct. 2009 16:52 - 1 réponse
Connectez-vous…
JoseM
#1
Posté le 30 octobre 2009 - 16:52
Is there any way when I click on the magnifying glass in a table can do a search for any string in the column? Alternatively, another way of doing the same search.
Thanks
Signaler
0
0
jackp_MDB
#2
Posté le 30 mai 2017 - 16:52
Yes...I wanted a "search" field outside of my table to use as a record "locator"...basically working the same as clicking on the hourglass in the LastName column in my table and then entering a search name...but I got tired of hitting the hourglass then entering the name, etc.
I used a standard edit control, added a "Clear/All" button to negate the search and a "Search" button (which I later hid/skipped.)
On my search entry field (EDT_SearchField) I changed the GUI, Right Click to "press" the Search button. This allowed me to enter any search characters I wanted in the EDT_SearchField and press the right mouse button to execute the search without having to move and select the "Search" button..
After experimenting I then added this code to the "Whenever modifying EDT_SearchName:
[code:wl]
Whenever modifying EDT_SearchName
// on "change" input right mouse key
SetFocus(WIN_Table_dbName.COL_LastName)
SendKey("{RIGHTBTN}",WIN_Table_dbName.EDT_SearchName)
In my example I have a window with a table displayed with a column named "COL_LastName." I search the COL_LastName for any matching LastNames that begin with the character/character sequence I entry into the "EDT_SearchName.,"
Each time I enter a key in the EDT_SearchName, the COL_LastName is incrementally searched. If I enter the letter "e", the first LastName beginning with "e" is brought to the top of the table.
If I continue and hit the "t" key, the COL_LastName is then incremented to show the first LastName beginning with "et," etc.
The search is not case sensitive..."e" is the same as "E"..."t" is the same as "T."
Signaler
0
0
→ Revenir à WEBDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte