Soykan,
I think you are just going to have to put some breakpoints in your code and step through it in the debugger to figure out what's going wrong.
>my last code of lostfocus event like below but still i am getting
>
>.... allready exist on the table message
>in another say always found returns .t. howewer i am trying newest idcode and there is not on the table but code still found() return .t.