Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer
For i = 1 To Table_1BindingSource.Count
If txtname.Text = NameTextBox.Text Then
If txtauid.Text = AuidTextBox.Text Then
Form2.Show()
Exit For
End If
ElseIf txtname.Text <> NameTextBox.Text Then
Table_1BindingSource.MoveNext()
End If
Next
If txtname.Text <> NameTextBox.Text Then
MessageBox.Show("คุณกรอกข้อมูลผิด กรุณากรอกข้อมูลใหม่", "Attention")
txtname.Clear()
txtauid.Clear()
txtauid.Focus()
Table_1BindingSource.Position = 0
End If
End Sub
End Class