不是bug,回车键相当于tab键了。要取消 e.cancel = true;
发觉代码没有问题。加一句 e.cancel = true
If e.KeyCode = Keys.Enter
Tables("运单.运单细表").AddNew
Tables("运单.运单细表").Current("客户单号")=e.Form.Controls("txtYundanBianhao").Text
'e.Form.Controls("SplitContainer1").Select
'e.Form.Controls("SplitContainer2").Select
With e.Form.Controls("txtYundanBianhao")
.Select()
.SelectionStart = 0
.SelectionLength = .Text.Length
End With
e.Cancel = True
End If