I have a login form to my database done in Access 2010 and using VBA code. I want to be able to press Enter on txtboxPassword
and automatically execu
The buttons in Access have a property called Default
(on the Other property page). If you set it to Yes
the form calls the button click event handler automatically, when you press Enter. No need for additional Key-event handling.
There is also a Cancel
property. If you set it to Yes
for a button, the form activates it automatically when the user types the Esc-key. Very practical for Cancel buttons.