解决方案 »

  1.   

    Private Sub text1_KeyPress(KeyAscii As Integer)
    if keyascii=13 then Command1.SetFocusEnd Sub
      

  2.   

    Private Sub text1_KeyPress(KeyAscii As Integer)
      if keyascii=vbKeyReturn then 
            Command1.SetFocus '焦点
            command1_click()  ’自动点击
      end if
    End Sub
      

  3.   

    Private Sub text1_KeyPress(KeyAscii As Integer)
    if keyascii=13 then 
    Command1.SetFocus
    keyascii=0
    endifEnd Sub
      

  4.   

    diyee(锦衣夜行)考虑很全面,赞同。
      

  5.   

    设置TabIndex 的织就可以了,没必要Command1.SetFocus
      

  6.   

    我认为直接设置控件的属性的TabIndex就行了.
    假如你把text1的设成1,再把command1的设成2就行了的,
    不信的话你可以试试了.
    呵呵.我就是这样做的.
      

  7.   

    如果该Command是默认回车的话,设置一下它的属性就可以了。