I am assuming you will not be using the enter key for anything else.
Generally the enter key has the default action of tabbing. Microsoft Access uses the result specified under Move After Enter on the Keyboard tab of the Options dialog box, available by clicking Options on the Tools menu.
Now that we have that out of the way, here is how you can get the enter key to perform certain actions at the form level.
1. Go to the design view of your form.
2. Open the Properties window for the form.
3. Go to the events tab.
4. Set Key Preview to Yes. This will tell access to evaluate key strokes at the form level before they evaluate them at the control level.
5. Now in the form's On Key Press event put this...
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
'Do something right here
End If
End Sub
Good luck.
ljprodev@yahoo.com
ProDev, MS Access Applications B-)