1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
Set acApp = New Access.Application
acApp.OpenCurrentDatabase stBase2, True, stPassWord
DoCmd.SetWarnings False
Set DbPermanent = DBEngine.OpenDatabase(stBase1, False, False, ";PWD=" & stPassWord)
For Each tdf In DbPermanent.TableDefs
If (tdf.Attributes And dbSystemObject) = 0 Then ' enlève les tables systèmes
stTab0 = tdf.Name
acApp.DoCmd.TransferDatabase acImport, "Microsoft Access", stBase1, acTable, stTab0, stTab0
Debug.Print tdf.Name
End If
Next
DbPermanent.Close
Set DbPermanent = Nothing
DoCmd.SetWarnings True
acApp.CloseCurrentDatabase
Set acApp = Nothing
etc ... |
Partager