Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date and String Seraching
Message
From
11/08/2000 01:41:42
 
 
To
11/08/2000 01:14:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00403777
Message ID:
00403780
Views:
10
Hello.

Yes, this is possible. In 8 years of xBase programming, I've learned that in FoxPro almost anything is possible... <s>

You have two ways:

1. In keypress event:

SELECT mytable
oldexact=SET("EXACT")
SET EXACT OFF
SET FILTER TO NAME=THIS.VALUE
... Some code to refresh form (users need to see what they're doing...)
SET EXACT &oldexact

2. One much more elegant approach:

Drop a dropdown list onto your combo. Set IncrementalSearch=.T. Set RowSourceType="3 - SQL Statement". Set RowSource="SELECT name FROM mytable INTO CURSOR crName ORDER BY NAME".

As the user types search string in dropdown list, the list will scroll up & down accordingly.

Notice. If interval between keystrokes is shorter than 0.5 sec, the dropdown list will narrow the search at every keystroke. If not, the dropdown list will begin a new search. If your user has slow fingers, you may consider to increase the defaul value (0.5 sec). This can be done by storing a numeric value in _DBLCLICK system variable. Range is 0.05 - 5 sec. (Maybe you desing a slider?)


Hope this helps
Grigore Dolghin
Class Software.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform