Access 2016, all tables linked to actual tables stored under sqlexpress.
I have a form with a combo box field, say Cbox01, populated with surnames taken from a table listing all members of the group, along with other info, among those CodeNo, unique for each member.
Of course, surnames may not be unique, but CodeNo is.
Now, the user writes the surname to be handled, and is presented, if surname not unique, with a list of all people with that surname. The user selects one and other fields of the form are filled using code in sub Cbox01_AfterUpdate(), e.g.
Code:
me.name= me.Cbox01.column(1) 'where column(1) contains the name of the selected person
me.Code = me.Cbox01.column(2) 'where column(2) contains the CodeNo of the selected person
and up to this point, everything works.
Now, if I try to use me.Cbox01.column(2) in the form code to continue processing, I get the CodeNo for the FIRST person in the list, not the one I selected. Is this normal?
Just to be concrete:
Assume I enter Smith and the combobox presents me with the following
Smith Anne 123
Smith Becky 444
I select the second, Becky, the code in afterupdate is executed and me.name = me.Cbox01.column(1) is Becky, and me.Code = me.Cbox01.column(2) is 444: OK.
Now in the form code I need again those value, but now me.Cbox01.column(1) is Anne, and me.Cbox01.column(2) is 123. I know that I can use the correct values in me.name and me.code, but is this how it is supposed to work?