<i><font color="#663300">txtbox1.Keypress method:
if nKeycode = 13 and empty(this.value) this.parent.parent.cmdCommandButton.Setfocus() endif
This method hits the correct commandbutton but it causes the commandbutton Keypress() to respond to an enter rather than waiting for a response which then triggers the click() event. I have checked with wait windows and the Keypress method is firing immediately with nkeycode = 13. i.e. as if ENTER had been pressed on the control. I have tried stuffing blanks into the keyboard buffer etc...</font></i>
Try adding <code>NODEFAULT</code> after the SetFocus() call. <font color="#cc0000"> ___/ / __/ / ____/</font> Ed Leafe ©2001 Ed Leafe |