>OK,
>
>I got the cursor to stay in the textbox by returning 0. One problem though, if I hit the cancel button on my form I don't want it to do the function inside the valid event of that textbox which it does everytime I want to leave that text box. I only want the code to happen when I hit enter on the keyboard. Valid might not be the correct function. How could I get around that?
>
>Thanks for your help everyone.
One nice thing about being a corporate developer is that you can, sometimes, set standards. In my case, the standard that I've set is simply if the value is empty, bypass the validation. There might be other conditions (key presses) that you might want to build in as well. For example, if the user presses shift + tab. In the case of that, I'd simply check LASTKEY() in the valid.
George
Ubi caritas et amor, deus ibi est