Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
If e.KeyCode = Keys.Enter Then
Cm = New OleDbCommand("Select * From Registration Where NoID='" & TextBox1.Text & "'", Cn)
Dr = Cm.ExecuteReader
If Dr.Read Then
TextBox1.Text = Dr("NoID")
TextBox2.Text = Dr("StudentID")
TextBox3.Text = Dr("Name_Sname")
ComboBox1.Text = Dr("BoardName")
ComboBox2.Text = Dr("ProgramName")
ComboBox3.Text = Dr("SubjectID")
TextBox4.Text = Dr("SubjectName")
TextBox6.Text = Dr("TermID")
TextBox7.Text = Dr("EducationYears")
TextBox8.Text = Dr("Grade")
End If
End If
End Sub