>>>[snipped]
>>Move it to .Valid() method like this:
>>
>>*Valid() method
>>IF ! "Dr" $ This.Value
>> =messagebox('This list should be Doctors only.',16,'Go Back')
>>RETURN 0
>>ENDIF
>
>It doesn't seem to work for me when I have ON ERROR ... on the form. What can I do? Even the -1 doesn't work either.
Does it work without ON ERROR routine? ERROR routine might return you to another place. RETURN -1, as Sergey says will shift the focus to the previous control in a tab order.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison