Also, you could use the MessageBox function to display your own message to the user before you
return 0.
>whoops...sorry Jeff, but thanks.
>
>As soon as I hit the 'Send' button, I was like, "oh no, come back, come back!"
>I realized what Barbara was saying. I need to 'return=.f.' there in the valid, not setfocus.... anyway....
>
>
>>I'm not Barbara and She's glad that you could never confuse me for her but, you can not call the setfocus method from a valid event. You can however have it on the lostfocus. Becareful using it in this manner because you can get the user stuck on that object if they don't know what info would be considerd valid.
>>
>>HTH
>>Jeff
>>>Hi Barbara,
>>>I put the setfocus() line in the valid of the field in question and it gave me, "Cannot call setfocus from within a when, valid, rangehigh or rangelow event." I have:
>>>
>>>If 'whatever'
>>>thisform.mypageframe1.page1.txtname.setfocus()
>>>endif
>>>
>>>?
Mark McCasland
Midlothian, TX USA