bonjour, j'ai réalisé un checkbox qui me permet de voir les "sans affections" quand il est vrai et quand il est faux je n'arrive pasa affiché les "sans affectation" et les "affecté" voici mon code
Merci
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
22 Private Sub Cocher_affectation_Click() Dim varAffecte As String Dim RowSourceEquip As String Dim RowSourceAbon As String Dim RowSourceEmpl As String Dim varSans_Affect As String Me.Recherche_Employé.Value = "" Me.Liste_Equipement.Value = "" Me.Liste_Abonnemen.Value = "" If Cocher_affectation.Value = True Then varSans_Affect = "Sans Affectation" Else varSans_Affect = "Sans Affectation" varSans_Affect = "Affecté" End If RowSourceEmpl = "SELECT Employé.User_ID, Employé.Prenom, Employé.Nom, Employé.Statut FROM Employé WHERE (((Employé.Statut)=""" & varSans_Affect & """ ));" Me.Recherche_Employé.RowSource = RowSourceEmpl End Sub
Partager