PDA

Click to See Complete Forum and Search --> : Call enter key press in text box??


Idiot2VB
Nov 4th, 1999, 12:57 AM
OK, anyone know how i can code so i can do the following:

I have a text box that the user enters info in. Instead of making a command button for the user to activate the event procedure, i want the user to press enter, and that event procedure will be activated. How do i do this?? Thanks in advance.

Serge
Nov 4th, 1999, 01:09 AM
Put this on Key_Press event of the Textbox:


Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
'Call your procedure here...
End If
End Sub




Regards,

------------------

Serge

Software Developer
Serge_Dymkov@vertexinc.com
Access8484@aol.com