1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| Private Sub Commande36_Click()
Dim strChoix As String
Dim strSql As String
strSql = "SELECT Year([tbl_General]![PeriodeDebutFormation]) AS AnneeDebutFormation, tbl_General.num_Axe,tbl_General.Service, Sum(tbl_General.DureeStageJours) AS SommeDeDureeStageJours,"
strSql = strSql & " tbl_General.Dispositif_code, tbl_General.Plan_Pluriannuel_autre, tbl_General.Plan_Pluriannuel, tbl_General.Suivi From tbl_General"
strSql = strSql & " GROUP BY Year(tbl_General.PeriodeDebutFormation), tbl_General.num_Axe, tbl_General.Service, tbl_General.Dispositif_code, tbl_General.Plan_Pluriannuel_autre, tbl_General.Plan_Pluriannuel, tbl_General.Suivi,"
'strSql = strSql & " HAVING(((tbl_General.num_Axe) = 3) And ((tbl_General.Dispositif_code) = 'PLAN' Or (tbl_General.Dispositif_code) = 'PLAN-RECY' Or (tbl_General.Dispositif_code) = 'CPF') And ((tbl_General.Plan_Pluriannuel_autre) = False) And ((tbl_General.Plan_Pluriannuel) = False) And ((tbl_General.Suivi) <> 'Reporté' And (tbl_General.Suivi) <> 'Annulé'))"
strChoix = fGetListe(Me.Lst_anneeMulti)
If Len(strChoix) > 0 Then
strSql = strSql & " WHERE AnneeDebutFormation in(" & strChoix & ")"
End If
strSql = strSql & ""
Dim Qrd As DAO.QueryDef
'Créer une requête
Set Qrd = CurrentDb.CreateQueryDef("MaNouvelleRequete", strSql)
End Sub |
Partager