I programmed an event so that when the user press the ' it put in the current time. On the first press of the key, it just places a blank row below the one i am starting and remains null. When the key is pressed a second time, it successfully inserts the current time. Does anyone know how to get this to work the first time the key is pressed? Also, if the datagrid has 2 blank rows initially, instead of just the one, then the keypress works the first time.
Here is a little code:
Private Sub HandleKeyPress(ByVal sender As Object, ByVal e As KeyPressEventArgs)
If e.KeyChar = "'" Then
Me.TextBox.Text = FormatDateTime(TimeOfDay, DateFormat.ShortTime)
e.Handled = True
End If
End Sub
Thanks in advance,
Melon
Here is a little code:
Private Sub HandleKeyPress(ByVal sender As Object, ByVal e As KeyPressEventArgs)
If e.KeyChar = "'" Then
Me.TextBox.Text = FormatDateTime(TimeOfDay, DateFormat.ShortTime)
e.Handled = True
End If
End Sub
Thanks in advance,
Melon