Private Sub txt_code_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_code.KeyDown
If e.KeyCode = Keys.Enter Then
'ตรงนี้ก็เขียน Function Query มาใน DataGrid
'QueryGrid()
End If
End Sub
Sub QueryGrid()
'You code
End Sub