Bonjour,

je rame sur un export de requête en fichier txt...

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
nomrepart = [Forms]![MENU]![Modifiable2]
mois = Format(Month(Now()), "00")
an = Right(Format(Year(Now()), "00"), 2)
jour = Replace(Str(Date), "/", "-")
delim = ","
 
Nomfichier = ("P:\REPARTYR\Exportation\REP") & mois & an & ("_") & nomrepart & ("_") & jour & Time & (".txt")
 
DoCmd.TransferText acExportDelim, ",", "R-EXPrepartBE", Nomfichier, False, ""
Réponse : la spécification de fichier texte "," n'existe pas

Et si je l'écris comme ça

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
nomrepart = [Forms]![MENU]![Modifiable2]
mois = Format(Month(Now()), "00")
an = Right(Format(Year(Now()), "00"), 2)
jour = Replace(Str(Date), "/", "-")
delim = ","
 
Nomfichier = ("P:\REPARTYR\Exportation\REP") & mois & an & ("_") & nomrepart & ("_") & jour & Time & (".txt)
 
DoCmd.TransferText acExportDelim, , "R-EXPrepartBE", Nomfichier, False, ""
Réponse : Le séparateur de spécification du fichier texte est identique au séparateur décimal ou au délimiteur de texte.

Pour info mon fichier text doit être séparé par des virgules.

Merci d'avance