I have a Form which is used to enter Transactions into a Transaction Table and contains a Combo Box used to look up Vendors from a Vendor Table.
The Combo Box is bound to the Transaction Table Vendor Number field, but the lookup is done by a Vendor Name field in the Vendor File.
There is no Vendor Name field in the Transaction Table.
The Combo Box works fine except in one situation. If there are multiple Vendors with the same Vendor Number but different Vendor Names the Combo Box does look up the Vendor by Vendor Name, and does save the transaction data with the Vendor Number correctly in the Transaction Table, but when the focus moves to the next field on the form, the Vendor Name reverts to the first name in sort order on the form. It seems to do a fresh lookup after saving the data and finds the first record by name.
As an example, assume that I have 3 vendors with Vendor Number 99999, named Donald Duck, Minnie Mouse and Porky Pig. If I enter a transaction for Minnie Mouse all works fine until the cursor moves out of the Vendor field and then the name Donald Duck appears in the field replacing Minnie Mouse, although Minnie Mouse data has been saved correctly in the Transaction Table.
It seems to me that "Minnie Mouse" should stay in the combo box field on the form, but don't know how to fix this problem.
The Combo Box is bound to the Transaction Table Vendor Number field, but the lookup is done by a Vendor Name field in the Vendor File.
There is no Vendor Name field in the Transaction Table.
The Combo Box works fine except in one situation. If there are multiple Vendors with the same Vendor Number but different Vendor Names the Combo Box does look up the Vendor by Vendor Name, and does save the transaction data with the Vendor Number correctly in the Transaction Table, but when the focus moves to the next field on the form, the Vendor Name reverts to the first name in sort order on the form. It seems to do a fresh lookup after saving the data and finds the first record by name.
As an example, assume that I have 3 vendors with Vendor Number 99999, named Donald Duck, Minnie Mouse and Porky Pig. If I enter a transaction for Minnie Mouse all works fine until the cursor moves out of the Vendor field and then the name Donald Duck appears in the field replacing Minnie Mouse, although Minnie Mouse data has been saved correctly in the Transaction Table.
It seems to me that "Minnie Mouse" should stay in the combo box field on the form, but don't know how to fix this problem.