1 2 3 4 5
| PARAMETERS [Formulaires]![Form Requete Pointages Resultats]![ListSalarie] Text ( 255 ), [Formulaires]![Form Requete Pointages Resultats]![TxtMois] DateTime, [Formulaires]![Menu Application DbLPE]![TxtUtilisateur] Text ( 255 );
SELECT "01_Pointages" AS [Index], Salaires.Matricule, [Nom_SAL] & " - " & [Prenom] AS Nom_Salarie, Unites.Responsable, Unites.Denomination, Comptes.Designation, Comptes.Compte, 1 AS Facteur, Year([Date_PT]) AS Annee, Month([Date_PT]) AS Mois, Format([Date_PT],"mm/yyyy") AS Mois_Traite, UCase(Format([Date_PT],"mmmm")) AS Mois_Nom, Format([Date_PT],"ww",0,0) AS Semaine, Day([Date_PT]) AS Jour, UCase(Left(Format([Date_PT],"dddd"),1)) AS Jour_Nom, DLookUp("[Marqueur]","[Feries]","[Date_FE] =#" & Format([Pointages].[Date_PT],"mm/dd/yyyy") & "#") AS Ferie, Pointages.Date_PT, Pointages.Heure_Debut, Pointages.Heure_Fin, Round(([Heure_Fin]-[Heure_Debut])*24,1) AS Quantite
FROM Comptes INNER JOIN ((Unites INNER JOIN Salaries AS Salaires ON Unites.Unite = Salaires.Unite) INNER JOIN Pointages ON Salaires.Matricule = Pointages.Matricule) ON Comptes.Compte = Pointages.Compte
WHERE (((Salaires.Matricule)=[Formulaires]![Form Requete Pointages Resultats]![ListSalarie]) AND ((Format([Date_PT],"mm/yyyy"))=[Formulaires]![Form Requete Pointages Resultats]![TxtMois])) OR (((Salaires.Matricule)=[Formulaires]![Menu Application DbLPE]![TxtUtilisateur]) AND ((Format([Date_PT],"mm/yyyy"))=[Formulaires]![Form Requete Pointages Resultats]![TxtMois]) AND (([Formulaires]![Form Requete Pointages Resultats]![ListSalarie])="")) OR (((Format([Date_PT],"mm/yyyy"))=[Formulaires]![Form Requete Pointages Resultats]![TxtMois]) AND (([Formulaires]![Form Requete Pointages Resultats]![ListSalarie])="") AND (([Formulaires]![Menu Application DbLPE]![TxtUtilisateur])="admin")) OR (((Unites.Responsable)=[Formulaires]![Menu Application DbLPE]![TxtUtilisateur]) AND ((Format([Date_PT],"mm/yyyy"))=[Formulaires]![Form Requete Pointages Resultats]![TxtMois]) AND (([Formulaires]![Form Requete Pointages Resultats]![ListSalarie])=""))
ORDER BY [Nom_SAL] & " - " & [Prenom], Comptes.Compte, Year([Date_PT]), Month([Date_PT]), Format([Date_PT],"ww",0,0), Day([Date_PT]), Pointages.Heure_Debut; |
Partager