I want to put 3 field values from a ComboBx into 3 variables by one click on the combo list by changing the BoundColumn property.
Here is my code:
Combo138.BoundColumn = 2
Var2 = Combo138.Value
Debug.Print "Var2=" & Var2
Combo138.BoundColumn = 3
Var3 = Combo138.Value
Debug.Print " Var3=" & Var3
Combo138.BoundColumn = 4
Var4 = Combo138.Value
Debug.Print " Var4=" & Var4
What happens is that at the end of the code, all 3 variables get the same value ie the last value.
Also, the value is often the wrong value.
How do I update the value after each line of code executes?
Any help is appreciated.
Here is my code:
Combo138.BoundColumn = 2
Var2 = Combo138.Value
Debug.Print "Var2=" & Var2
Combo138.BoundColumn = 3
Var3 = Combo138.Value
Debug.Print " Var3=" & Var3
Combo138.BoundColumn = 4
Var4 = Combo138.Value
Debug.Print " Var4=" & Var4
What happens is that at the end of the code, all 3 variables get the same value ie the last value.
Also, the value is often the wrong value.
How do I update the value after each line of code executes?
Any help is appreciated.