Bonjour je voudrai savoir comment on pourrai faire pour effacer tous les champs d'une form un fois appuyer sur un bouton...
Pour l'instant j'ai ce code là
Et alors ça me mets un message d'erreur Application error
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 Private Sub cmdvalid_Click() Dim Repaffichage Dim ctext As Control Repaffichage = MsgBox("Souhaitez-vous ajouter une autre pièce", vbYesNo + vbQuestion, "Ajout d'une pièce") If Repaffichage = vbYes Then For Each ctext In Me.Controls If ctext.Name Like "txt_*" Then ctext.Value = "" End If Next Saisie.Show Else If Repaffichage = vbNo Then Total.Show End If End If End Sub
Partager