Advertisement
CuttittaOfAllTrades

KeyDownEscape (VBA, MS Access)

Nov 6th, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Private Sub KeyDownEscape(frmCalling As Form, intKeyCode As Integer, intShift As Integer)
  2.    
  3.     Select Case intKeyCode
  4.         Case vbKeyEscape
  5.             If frmCalling.Dirty Then
  6.                 frmCalling.Undo
  7.                 frmCalling.Undo
  8.                 frmCalling.Undo
  9.             Else
  10.                 DoCmd.Close acForm, frmCalling.Name, acSaveNo
  11.             End If
  12.     End Select
  13.    
  14. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement