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 classActually 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:
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