为什么不直接用keydown事件?
If e.keycode = 13 Then
e.cancel = true
Dim no As String = e.Form.Controls("样品编号").text
Dim dr As DataRow = DataTables("T_Report").SQLFind("报告编号 = '" & no & "'")
If dr IsNot Nothing Then
e.Form.Controls("样品名称").value = dr("样品名称")
e.Form.Controls("客服人员").Value = dr("客服人员")
e.Form.Controls("储存条件").Value = dr("储存条件")
e.Form.Controls("是否抽检").checked = dr("是否抽检")
Else
e.Form.Controls("样品名称").value = Nothing
e.Form.Controls("客服人员").Value = Nothing
e.Form.Controls("储存条件").Value = Nothing
e.Form.Controls("是否抽检").checked = False
End If
End If