1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
| Dim sourceName As String
' Initialisez la source de sous-formulaire avec la requête de base
sourceName = "Query.P_Product_Critère_Base"
' Obtenez les valeurs des 11 critères
Dim critereKV40 As Variant
Dim critereEAL As Variant
Dim critereApplication As Variant
Dim critereCompany As Variant
Dim critereHX1 As Variant
Dim critereLusC As Variant
Dim critereBenefit As Variant
Dim critereBio As Variant
Dim critereFP As Variant
Dim critereVI As Variant
Dim critereChem As Variant
critereKV40 = Forms![__F_Navigation]![NavigationSubform].[Form]![P_KV40_Research]
critereEAL = Forms![__F_Navigation]![NavigationSubform].[Form]![P_EAL_Research]
critereApplication = Forms![__F_Navigation]![NavigationSubform].[Form]![P_Application_Research]
critereCompany = Forms![__F_Navigation]![NavigationSubform].[Form]![P_Comp_Research]
critereHX1 = Forms![__F_Navigation]![NavigationSubform].[Form]![P_HX1_Research]
critereLusC = Forms![__F_Navigation]![NavigationSubform].[Form]![P_LusC_Research]
critereBenefit = Forms![__F_Navigation]![NavigationSubform].[Form]![P_Benefit_Research]
critereBio = Forms![__F_Navigation]![NavigationSubform].[Form]![P_Bio_Research]
critereFP = Forms![__F_Navigation]![NavigationSubform].[Form]![P_FP_Research]
critereVI = Forms![__F_Navigation]![NavigationSubform].[Form]![P_VI_Research]
critereChem = Forms![__F_Navigation]![NavigationSubform].[Form]![P_Chem_Research]
' Ajoutez des critères actifs à la source de sous-formulaire
If Not IsNull(critereKV40) Then
sourceName = sourceName & " + Query.R_Product_Critère_KV40"
End If
If Not IsNull(critereEAL) Then
sourceName = sourceName & " + Query.R_Product_Critère_EAL"
End If
If Not IsNull(critereApplication) Then
sourceName = sourceName & " + Query.R_Product_Critère_Application"
End If
If Not IsNull(critereCompany) Then
sourceName = sourceName & " + Query.R_Product_Critère_Company"
End If
If Not IsNull(critereHX1) Then
sourceName = sourceName & " + Query.R_Product_Critère_HX1"
End If
If Not IsNull(critereLusC) Then
sourceName = sourceName & " + Query.R_Product_Critère_LusC"
End If
If Not IsNull(critereBenefit) Then
sourceName = sourceName & " + Query.R_Product_Critère_Benefit"
End If
If Not IsNull(critereBio) Then
sourceName = sourceName & " + Query.R_Product_Critère_Bio"
End If
If Not IsNull(critereFP) Then
sourceName = sourceName & " + Query.R_Product_Critère_FP"
End If
If Not IsNull(critereVI) Then
sourceName = sourceName & " + Query.R_Product_Critère_VI"
End If
If Not IsNull(critereChem) Then
sourceName = sourceName & " + Query.R_Product_Critère_Chem"
End If
Set sousform_Extraction = Forms![__F_Navigation]![NavigationSubform].[Form]![sousform_Extraction]
sousform_Extraction.SourceObject = sourceName
sousform_Extraction.Form.Requery
End Sub |
Partager