Using B4A 3.20, I'm trying to get my app to move to another view (from one EditText named edtOSGBGridRef2 to another EditText named edtOSGBGridRef3, both of them being for Decimal Figures). However, I can see that the runtime path with a 4 digit number being entered (i.e. it passes the length validation shown below) goes through both the Msgbox's shown below but the RequestFocus command does not work since the focus moves to another view:
What am I doing wrong?
PS I have other RequestFocus commands after other EditText views' values are entered & none of them work.
B4X:
Msgbox("Enter", "GR2")
If edtOSGBGridRef2.Text.Trim.Length < 2 OR edtOSGBGridRef2.Text.Trim.Length > 5 Then
DisplayMsgbox("OSGB Grid Reference Across must be 2 to 5 digits", "Incorrect OSGB Grid Reference Across")
Else
Msgbox("Valid", "GR2")
edtOSGBGridRef3.RequestFocus
End If
PS I have other RequestFocus commands after other EditText views' values are entered & none of them work.