Make vbKeyReturn equivalent to vbKeyTab
-
I have developed a data entry form and set the tab order, but in entering data, it seems more intuitive to use the Enter Key than the Tab to change the focus to the next text box. Is there a way to make these two keys work the same way in this application? Thanks! nvmoss
-
I have developed a data entry form and set the tab order, but in entering data, it seems more intuitive to use the Enter Key than the Tab to change the focus to the next text box. Is there a way to make these two keys work the same way in this application? Thanks! nvmoss
-
Thanks! I'm new at this. I assume that key code 13 is the Enter key, but how do I "trap" it? Thanks Again! nvmoss
-
Thanks! I'm new at this. I assume that key code 13 is the Enter key, but how do I "trap" it? Thanks Again! nvmoss
I don't know why, but
KeyPress
tends to work better for this (for me, at least) thanKeyDown
.' include whatever controls you want to have this functionality
Private Sub KeyPressed(ByVal sender As Object, ByVal e As KeyPressEventArgs) Handles _
TextBox1.KeyPress, TextBox2.KeyPress, TextBox3.KeyPress, TextBox4.KeyPress
If e.KeyChar = ChrW(13) Then
ProcessTabKey(True)
e.Handled = True
End If
End SubThis isn't the only way to do what you want, but it works. Charlie if(!curlies){ return; }