Barbara,
I prefer the valid solution. If you place a NODEFAULT in the LostFocus code, the field will never loose focus. At least, that's what I found with a combobox
José
>>>I have a field, pr_nbr, that when the focus is lost, checks for the existence of another pr_nbr in the file that matches the one the user just lost the focus of. If there is a match, I want the focus set back to the pr_nbr but the focus always goes to the next object. I've instituted a 'thisform.pr_nbr1.setfocus but itdoes not matter.
>>
>>You could move your code into Valid event, and return .F. over there if you want to stay in the textbox.
>
>If you don't want a control to go to the next (in tab order) control, you must issue a NODEFAULT command in addition to the code that tells you where you DO want to go.
>
>HTH
>Barbara