Option Compare Database
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyEscape
If Me.Dirty Then Me.Undo ' Cancel any changes
DoCmd.Close acForm, Me.FormName
End Select
End Sub
Private Sub Command2_Click()
On...