How to get form control value on OnEnter event of the control

I have extended form and I have added two dropdown controls A&B.

Now I want change the lookup of control B based on selected value of control A.

I have written code on OnEnter() event of control B but when debug the code I did not get the value of control A

Please suggest how to get selected value of control A on form OnEvent() of the control B

In fact I need to change the data source of the control B based control A value.

Why do you want to use onEnter() at all?

If I understand your requirement correctly, all you need to do it overriding lookup() of control B and add a range to the query with a value of control A.

Yes Martin, I have achieved it by overriding lookup() on control B, Thanks