新建From1(窗体),新建Text1(TextBox),Text2(TextBox),代码:
Private Const VK_TAB = &H9
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
KeyAscii = 0
keybd_event VK_TAB, 0, 0, 0
End If
End Sub