From: popat on
I have a text box on the form. When entry is complete in
the textbox and an ENTER key is pressed I want to acticate
the button having caption "ADD" so that the next press of
ENTER key will press the ADD button. Currently pressing
ENTER key while in textbox, nothing happens.

Thanks,
From: Dmitriy Antonov on
Try something like this:

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then cmdAdd.Default = True
End Sub

Dmitriy


"popat" <anonymous(a)discussions.microsoft.com> wrote in message
news:7d0401c52854$2a04d1d0$a601280a(a)phx.gbl...
>I have a text box on the form. When entry is complete in
> the textbox and an ENTER key is pressed I want to acticate
> the button having caption "ADD" so that the next press of
> ENTER key will press the ADD button. Currently pressing
> ENTER key while in textbox, nothing happens.
>
> Thanks,


 | 
Pages: 1
Prev: VB6 Support Update
Next: Print to USB?