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
|
Set oProgress = New clProgress
'oProgress.ProgressMin = 1
'oProgress.ProgressMax = lNbIterations
'oProgress.ProgressValue = 0
oProgress.GeneralInfo = "Veuillez patienter durant le traitement ... "
oProgress.AnimationTimer = 500 ' <== Lance l'animation
oProgress.Visible = True
' Boucle de traitement
DoEvents
'Boucle de traitement
'Effacement ancienne spécification temporaire
For x = 0 To CurrentProject.ImportExportSpecifications.Count - 1
If CurrentProject.ImportExportSpecifications.Item(x).Name = "TemporaryImport" Then
CurrentProject.ImportExportSpecifications.Item("TemporaryImport").Delete
x = CurrentProject.ImportExportSpecifications.Count
End If
Next x
'Correction chemin nouvelle spécification
Set OldSpec = CurrentProject.ImportExportSpecifications.Item("Importation-Base_ACP")
CurrentProject.ImportExportSpecifications.Add "TemporaryImport", OldSpec.XML
Set NewSpec = CurrentProject.ImportExportSpecifications.Item("TemporaryImport")
NewSpec.XML = Replace(NewSpec.XML, "\\160.220.70.24\Documents Etablissement BLY\SERVICES\ADMINISTRATION\Partage C&amP\Application Access\Base_ACP.csv", NewPath)
NewSpec.Execute
Set NewSpec = Nothing
Bouton_Import_01.Enabled = False
Bouton_Import_02.Enabled = True
Screen.MousePointer = 0 'Pointeur souris en forme normale
'Fermeture du formulaire d'attente
Set oProgress = Nothing |
Partager