VB
tuti
-
Polux31 Messages postés 7219 Statut Membre -
Polux31 Messages postés 7219 Statut Membre -
Bonjour,
Je souhaite importer des ficher CSV avec des chemin relatif en fonctin des fichiers, j'ai donc utilisé ce code
Private Sub LstFichier_DblClick(Cancel As Integer)
Screen.MousePointer = 11
Fichier = LstFichier.Value
LblFacture.Caption = Fichier
Table2Sup = Left(Fichier, Len(Fichier) - 4) + "_ImportErrors"
DoCmd.SetWarnings False
Sql = "DELETE * FROM [TmpFacture]"
DoCmd.RunSQL Sql
Fichier = Left(Application.CurrentDb.Name, Len(Application.CurrentDb.Name) - 4) + "\factures\" + Fichier
DoCmd.TransferText acImportDelim, "SpecificationTel", "TmpFacture", Fichier
Sql = "UPDATE [TmpFacture] SET [TmpFacture].[IDENTIFIANT INSTALLATION] = '0'+[TmpFacture]![IDENTIFIANT INSTALLATION]"
DoCmd.RunSQL Sql
Mais il ne marche pas et je ne comprends pas pourquoi alors si quelqu'un à une petite idée sur la question réponder moi SVP. MErci
Je souhaite importer des ficher CSV avec des chemin relatif en fonctin des fichiers, j'ai donc utilisé ce code
Private Sub LstFichier_DblClick(Cancel As Integer)
Screen.MousePointer = 11
Fichier = LstFichier.Value
LblFacture.Caption = Fichier
Table2Sup = Left(Fichier, Len(Fichier) - 4) + "_ImportErrors"
DoCmd.SetWarnings False
Sql = "DELETE * FROM [TmpFacture]"
DoCmd.RunSQL Sql
Fichier = Left(Application.CurrentDb.Name, Len(Application.CurrentDb.Name) - 4) + "\factures\" + Fichier
DoCmd.TransferText acImportDelim, "SpecificationTel", "TmpFacture", Fichier
Sql = "UPDATE [TmpFacture] SET [TmpFacture].[IDENTIFIANT INSTALLATION] = '0'+[TmpFacture]![IDENTIFIANT INSTALLATION]"
DoCmd.RunSQL Sql
Mais il ne marche pas et je ne comprends pas pourquoi alors si quelqu'un à une petite idée sur la question réponder moi SVP. MErci
A voir également:
- VB
- Vb - Télécharger - Langages
- Vb audio cable - Télécharger - Audio & Musique
- Vb editor - Télécharger - Langages
- Vb 6 - Télécharger - Divers Utilitaires
- Vb express - Télécharger - Langages