I found this, but none of my command buttons have their Cancel property set to yes.
The KeyDown event does not occur when you press:
- The ENTER key if the form has a command button for which the Default property is set to Yes.
- The ESC key if the form has a command button for which the Cancel property is set to Yes.
Still not sure why the event doesn't fire with the form's key down event, but I moved the event to the combo box where it probably should have been from the start. The event moves the focus off the combo box and then renders it invisible when the Esc button is pressed.
Is the KeyPreview Property set to Yes; It has to be for KeyDown event to fire.
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007
I did not know that. The form's KeyPreview property remained at its default value of "No". I'll leave the solution as is, in that it's more appropriate to the app. I will test the KeyPreview setting just for my own education.
Thanks,
Bill