elect
End Sub

''' &lt;summary&gt;
''' Customise edit cancellation or end when a key down event occurs
''' in the edit control.
''' &lt;/summary&gt;
''' &lt;param name="KeyCode"&gt;Key which was pressed.&lt;/param&gt;
''' &lt;param name="Shift"&gt;Shift state.&lt;/param&gt;
Private Sub txtEdit_KeyDown(KeyCode As Integer, Shift As Integer)
   
   If (KeyCode = vbKeyReturn) Then
      ' Request Commit edit.  This will fire the
      ' grid's PreCancelEdit event, which gives you
      ' an opportunity to valid