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
| Dim qd As QueryDef, qe As QueryDef, Qf As QueryDef, Qg As QueryDef, Qh As QueryDef, Qi As QueryDef, Qj As QueryDef, Qk As QueryDef, Ql As QueryDef, Qm As QueryDef
Set qd = CurrentDb.CreateQueryDef("VN", "Select * From R_MODVN")
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "VN", "c:\PEROU-M53_Moteurs.xls"
DoCmd.DeleteObject acQuery, "VN"
'
Set qe = CurrentDb.CreateQueryDef("LFDVA", "Select * From R_MODLFDVA")
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "LFDVA", "c:\PEROU-M53_Moteurs.xls"
DoCmd.DeleteObject acQuery, "LFDVA"
'
Set Qf = CurrentDb.CreateQueryDef("MOD1", "Select * From R_MOD1")
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "MOD1", "c:\PEROU-M53_Moteurs.xls"
DoCmd.DeleteObject acQuery, "MOD1"
'
Set Qg = CurrentDb.CreateQueryDef("MOD2", "Select * From R_MOD2")
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "MOD2", "c:\PEROU-M53_Moteurs.xls"
DoCmd.DeleteObject acQuery, "MOD2"
'
Set Qh = CurrentDb.CreateQueryDef("MOD3", "Select * From R_MOD3")
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "MOD3", "c:\PEROU-M53_Moteurs.xls"
DoCmd.DeleteObject acQuery, "MOD3"
'
Set Qi = CurrentDb.CreateQueryDef("MOD6", "Select * From R_MOD6")
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "MOD6", "c:\PEROU-M53_Moteurs.xls"
DoCmd.DeleteObject acQuery, "MOD6"
'
Set Qj = CurrentDb.CreateQueryDef("MOD7", "Select * From R_MOD7")
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "MOD7", "c:\PEROU-M53_Moteurs.xls"
DoCmd.DeleteObject acQuery, "MOD7"
'
Set Qk = CurrentDb.CreateQueryDef("MOD8", "Select * From R_MOD8")
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "MOD8", "c:\PEROU-M53_Moteurs.xls"
DoCmd.DeleteObject acQuery, "MOD8"
'
Set Ql = CurrentDb.CreateQueryDef("VN à réaliser", "Select * From R_NbVnRealise")
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "VN à réaliser", "c:\PEROU-M53_Moteurs.xls"
DoCmd.DeleteObject acQuery, "VN à réaliser"
'
Set Qm = CurrentDb.CreateQueryDef("Pièces à Remplacer", "Select * From R_NbRemplacementPiece")
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "Pièces à remplacer", "c:\PEROU-M53_Moteurs.xls"
DoCmd.DeleteObject acQuery, "Pièces à remplacer" |
Partager