A
andy.cotgreave
HI,
I have a form with various text boxes and buttons.
One button is the Default, so any "Enter" key presses trigger that
button's Click event.
I added a new text box and a new button. For this text box, when the
user presses Enter, the NEW button's click event must be triggered.
I trap the Enter key in the KeyDown event of the new text box, looking
for a keycode of 13.
Here's the problem:
- If i put a breakpoint in the code, the Enter key is trapped and the
correct button's click event is called
- if i tab into the new text box from another text box and immediately
press enter, it works correctly.
- if i TYPE something in the new text box and THEN press enter, the
default action is triggered, and my Enter key handling doesn't work.
Any ideas?
(running Access 2003)
Andy
I have a form with various text boxes and buttons.
One button is the Default, so any "Enter" key presses trigger that
button's Click event.
I added a new text box and a new button. For this text box, when the
user presses Enter, the NEW button's click event must be triggered.
I trap the Enter key in the KeyDown event of the new text box, looking
for a keycode of 13.
Here's the problem:
- If i put a breakpoint in the code, the Enter key is trapped and the
correct button's click event is called
- if i tab into the new text box from another text box and immediately
press enter, it works correctly.
- if i TYPE something in the new text box and THEN press enter, the
default action is triggered, and my Enter key handling doesn't work.
Any ideas?
(running Access 2003)
Andy