-
I have the following bits of code on my form
Private Sub l_surname_KeyPress(KeyAscii As Integer)
KeyAscii = UCaseKeyPress(KeyAscii)
End Sub
Private Sub l_surname_LostFocus()
'
If Not g_exit_pressed Then
checkTextBox l_surname
End If
'
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
SendKeys "{tab}"
End If
End Sub
The code works fine, and the return key send a tab. BUT, when leaving the l_surname field with the return key I het a 'Ping' sound from windows.
Any Ideas Folks?
Cheers
Neil
-
make:
If KeyAscii = vbKeyReturn Then
as:
If KeyAscii = vbKeyReturn Then
KeyAscii = 0
and I think it will work without "Ping"
-
Kars
Many Thanks for your help.
That worked a treat.
Cheers
Neil