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
txtboxPassword
KeyPress rather than KeyDown works for me, and calling the _Click sub avoids sending triggers that may fire other events.
Private Sub txtboxPassword_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Call btnLogin_Click End If End Sub