Posted on 2003-02-25
Hi there, looking for help from you Delphi gurus out there.
I have 2 TDBLookUpComboBoxes that both point to the same table and same database. I would like it that if I click and choose a record in the 1st lookupcombobox that maps to a field in the table e.g a customer number then the 2nd combobox will change automatically to display that customer's name and vice versa i.e. if I choose a customer's name in the 2nd combo then the 1st should change to show his/her customer number.
I know that both these fields can be displayed and combined within the same lookupcombo using the ';' operator in the LookupDisplay property but for certain reasons I'd like to do it this way.
I've tried everything but when I change the 1st LookUpCombo, the 2nd one doesn't change and vice versa. Funnily enough, when I use a TDBLookUpListBox control rather than a combo (using the tableindex number in the keyfield property), it works fine and both change to map each other's choices but I need a combobox and the lookupcombo doesn't seem to have a keyfield property like the listbox.
Can anyone help?