Private Sub TxtSearch_Change() ' Chercher un nom et remplir
Dim L%
If Me.TxtSearch = "" Then Exit Sub
If Application.CountIf([B:B], Me.TxtSearch) = 0 Then Exit Sub
L = Application.Match(Me.TxtSearch, [B:B], 0)
With Sheets("DATA")
TextB_Num_Enreg.Value = .Cells(L, "A") 'TextB_Num_Enreg Numéro
TextBox2.Value = .Cells(L, "B") 'Nom et prénom
TextB_Naiss.Value = CDate(.Cells(L, "C")) 'Date de Naissance
TextB_Age_A.Value = .Cells(L, "D") 'TextB_Age_Années
TextB_Age_M.Value = .Cells(L, "E") 'TextB_Age_Mois
TextB_Age_J.Value = .Cells(L, "F") 'TextB_Age_Jours
TextBox5.Value = .Cells(L, "G") 'Lieu de naissance
TextBox6.Value = .Cells(L, "J") 'Nombre d'enfants
TextBox7.Value = .Cells(L, "K") 'Adresse '
TextBox8.Value = .Cells(L, "M") 'Lieu de Travail
TextB_Fonction.Value = .Cells(L, "N") 'Fonction
TextB_Installation.Value = CDate(.Cells(L, "O")) 'Date d'installation
TextB_Anc_Inst.Value = .Cells(L, "P") 'installation Ancienneté_Années
TextBox22.Value = .Cells(L, "Q") 'installation Ancienneté_Mois
TextBox23.Value = .Cells(L, "R") 'installation Ancienneté_Jours
TextBox13.Value = .Cells(L, "S") 'Observation
ComboBox4.Value = .Cells(L, "H") 'Sexe
ComboBox1.Value = .Cells(L, "I") 'Situation Familiale
ComboBox2.Value = .Cells(L, "L") 'Certificat Obtenu
On Error GoTo 0
End With
End Sub