>
>The problem occurrs when the user clicks on the Cancel button on the form. Then, the valid event fires and focus returns to the textbox.
>
>Thanks!
>
>Alex
Set the Cancel property of the Cancel button to .T. That will set LASTKEY() to 27.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer