two combo boxes

Copper Contributor

Kia ora team,

I am new to using access so please bear with me.

 

I am trying to link two combo boxes on a form so that when information is entered into either of the boxes, the other is auto-populated ie.

I enter a Full Name into box1 and box2 auto-populates their Customer ID

OR

I enter the Customer ID into box2 and box1 auto-populates their Full name. 

 

I managed to auto-populate the Customer ID box when it was a textbox using the formula:

me.txtCustomerID.value=me.cboFullName.column(1)

and thought if I changed the textbox to a combo box and update the name of the combo box in the formula it would work, like this:

me.cboCustomerID.value=me.cboFullName.column(1)

with no luck.

 

Can someone please tell me that they understand what I'm asking and that there's a way to do it? 

1 Reply
Why do this at all? What do you gain by populating a second combo box like this? It seems redundant at best and potentially risky.
That said, the BOUND column of a combo box is Column(0), because the columns are indexed, left to right, starting with 0. The ID value is the one bound to the combo box and that would normally be in Column(0), while the text value displayed, i.e. "FullName" would be in Column(1).
There is absolutely NO reason to try to use "FullName" as the bound column in a combo box that I can see.