synchronise combo boxes

jillrein

Registered User.
Local time
Yesterday, 20:30
Joined
Apr 19, 2008
Messages
28
I have two unbound combo boxes on a form that allow user to find a record on the form. The user chooses which to use depending on whether they want to search by customer name or number. Both work fine. However, if they choose to select by number, I want the second combo to display the corresponding name and vice versa. Both combos are sorted differently so the index numbers for the selected items will be different. Any help would be much appreciated.
 
Code:
Private Sub Form_Current()
  Me.cboCustomerName = Me.CustomerName
  Me.cboCustomerNumber = Me.CustomerNumber
End Sub

Replacing the combobox names and textbox names with your own, of course.
 
Thank You!

:) You are a star. Thank you. I am new to this and was doing the right thing but on the wrong event. You have saved me a lot of time and frustration.
 

Users who are viewing this thread

Back
Top Bottom