Maybe some of you have already experienced this but I just spent an hour and a half trying to figure out why code I copied and pasted wouldn't work when it did in the place from which it came. In desperation, I deleted the copied and pasted stuff and manually typed it in, NOW IT WORKS! It seems like this happened once before but it was a long time ago. Fortunately, it is only a rare occurrence. So..if everything else fails try it.
I have no idea. I was trying to delete the decimal but the code would not do it until I deleted and re-typed it. However, it worked fine for another edittext.
I re-typed the first 6 lines.
B4X:
Sub txtangle_FocusChanged(HasFocus As Boolean)
If HasFocus =False Then
Main.strbearing=txtangle.Text 'value containing decimal
If Main.strbearing.IndexOf (".")>0 Then 'test for decimal
Main.strbearing=Main.strbearing.Replace (".","") 'delete the decimal
End If
.
.
.
.
End If
End Sub