Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can COMBO Box be Editable & Searchable
Message
From
25/06/1997 08:58:57
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00037684
Message ID:
00037689
Views:
27
>I am in need of a combo box in vfp 5.0a that is populated from a look up table, that the user can add data to,
>and the user can enter a key stroke for searching through the list. Can this be done all in one combo box.
>
>Key points
>
>Drop down list
>Search List on key strokes
>Add new item by just typing.
>
>TIA


Hey Ed! You want to take this one? LOL Sorry Bret, Ed and I have gotten into a number of discussion regarding this.

I have a combobox that uses an array populated from a keyfield in a lookup table. It is a combobox (as opposed to listbox) and it evaluates the entry using a select. If there's a single hit, valid returns .t. If a multiple hit (based on a partial entry) the user is prompted to select from the new result set (i.e. all entries beginning with 's'). Otherwise the user is prompted to add a new record and a form pops up to complete the remaining data in the record.

It works...but....in retrospect, I should have used a SQL statment (cursor) instead of an array. In deference to Ed and some of the others who offered opinions, arrays are a thing of the past where combos are concerned.

If you want to see my code, I'd be happy to email it to you. But using the above scenario with a SQL instead of an array, you'll prob. be able to program something yourself quite nicely. (In either case, the most important properties are Value and DisplayValue and method Refresh)

HTH
Matt McDonnell
...building a better mousetrap with moldy cheese...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform