Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Searching and ListBox
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00879792
Message ID:
00879820
Views:
15
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform