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
|
Function warning2()
Dim oDb As DAO.Database
Set oDb = CurrentDb
'...debut prog...
'Creation Analyse croisee Warning_Holds
Dim qd As DAO.QueryDef
nomFeuille = "Sheet1"
Set qd = CurrentDb.CreateQueryDef(nomFeuille, "TRANSFORM Sum(Warning.jours_immo) AS SumOfjours_immo " _
& "SELECT Warning.Service, Warning.projet, Warning.lot_number, Warning.Wafers, Warning.prod, " _
& "Warning.oper, Warning.operation_descr, Warning.responsable " _
& "FROM warning " _
& "GROUP BY Warning.Service, Warning.projet, Warning.lot_number, Warning.Wafers, Warning.prod, " _
& "Warning.oper, Warning.operation_descr, Warning.responsable " _
& "PIVOT Warning.hold_category;")
'Transfert des resultats
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel11, nomFeuille, nomFich, True
DoCmd.DeleteObject acQuery, nomFeuille
oDb.Close
Set oDb = Nothing
End Function |
Partager