Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Searching and ListBox
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00879792
Message ID:
00879820
Vues:
14
>I have a textbox and a ListBox, populated with a table of Last Names. Is there a way
>to make it so that as I type a last name into the TextBox, the search takes place.
>Steve

If you have a table with lastname as a key:
USE NAMES in 0 order lastname && UPPER(lastname)
Procedure MyText.InteractiveChange
lcSearchKey=upper(alltrim(this.value))
set exact off
if seek(lcSearchKey,"NAMES","lastname")
   MyForm.MyListBox.Value=names.lastname
else
   MyForm.MyListBox.Value=" "
endif
set exact on
endproc
Or, you could do it in the listbox using IncrementalSearch feature!
Imagination is more important than knowledge
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform