This example cancels any changes made to data in bound controls and restores the data to the original values. The KeyPreview property of the Form must be True.
Sub Form_KeyDown (KeyCode As Integer, Shift As Integer)
Const KEY_ESCAPE = &H1B
If KeyCode = KEY_ESCAPE Then
Data1.UpdateControls
End If
End Sub