1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Public Sub test()
Dim Db As DAO.Database, tbd As DAO.TableDef, fld As DAO.field
Set Db = CurrentDb
'Création de la table de cumul
Db.Execute "CREATE TABLE CumulTest(NumTri LONG, TestEffectueLe DATETIME, TestEffectuePar TEXT(50), Nom_test TEXT(50));"
'Ajout des données dans la table de cumul
For Each tbd In Db.TableDefs
If Left(tbd.Name, 4) <> "MSys" And Left(tbd.Name, 4) <> "~TMP" And Left(tbd.Name, 3) <> "3G_" And tbd.Name <> "Carte SIM" And Left(tbd.Name, 3) <> "Sit" And tbd.Name <> "AVP" And tbd.Name <> "DernModif" And tbd.Name <> "Détails" And tbd.Name <> "Liste des tests" And tbd.Name <> "CumulTest" And tbd.Name <> "Mobile" Then
MaReq = "INSERT INTO CumulTest(NumTri, TestEffectueLe, TestEffectuePar,Nom_test) SELECT [N° de tri], [Test effectué le], [Effectué par], FROM [" & tbd.Name & "];"
Db.Execute (MaReq)
Debug.Print MaReq
End If
Next tbd
End Sub |
Partager