Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6SP5 - Unselect Combo selection
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00795134
Message ID:
00795906
Views:
95
This message has been marked as a message which has helped to the initial question of the thread.
Agreed and if such a cbo does also this, well that is just what the doctor ordered.

This is the way that combo's work < s >. All you have to do is include the foreign key value in the combo's RowSource and set the combo's BoundColumn up to point to the column that contains the key value. This tells the combo to use whatever is in the BoundColumn to update the combo's ControlSource.

Of course, if the foreign key is numeric, you also need to set BoundTo to true.

will the KeyPress() you shared with me be the ticket? or is there more codes required for such a auto-complete combo box class

Actually the code that I posted is in a custom method of the combo called HandleKey(). Method is called from the InteractiveChange() method of the combo like this:
*** handle the key...IOW, find the closest match in the list
IF This.SelStart > 0
  IF ( LASTKEY() > 31 AND LASTKEY() < 128 ) OR ( LASTKEY() = 7 )
    This.HandleKey()
  ENDIF   
ENDIF
This Quickfill combo is only one of the useful classes in 1001 Things You Wanted to Know About Visual FoxPro
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform