Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click For i = 0 To 5 If Val(TextBox1.Text) = tbl(i).numcand Then TextBox2.Text = tbl(i).nom_prenom DateTimePicker1.Text = tbl(i).datenaiss ComboBox1.Text = tbl(i).spec TextBox3.Text = tbl(i).moyenne If tbl(i).niveau = "B" Then RadioButton1.Checked = True ElseIf tbl(i).niveau = "D" Then RadioButton2.Checked = True ElseIf tbl(i).niveau = "L" Then RadioButton3.Checked = True End If End If
Next End Sub