Set MaConn = New ADODB.Connection
MaConn.Provider = "Microsoft.Jet.OLEDB.4.0;"
MaConn.Open "C:\personnel\GCP.mdb"
Set rsttable = New ADODB.Recordset
rsttable.Open "cariére", MaConn, , , adCmdTable
Open "C:\personnel\EXPORT.txt" For Output As #1
While Not rsttable.EOF
Print #1, "0000000008" & Right("0000000000" + Trim(rsttable!matricule), 10) & Left(rsttable!Nom + Space(40), 40) & Left(rsttable!Prenom + Space(40), 40) & Format$(rsttable!datenaissance , "ddMMyyyy") & rsttable!sexe & Format$(rsttable!DateDebut, "ddMMyyyy") & Format$(rsttable!DateFin, "ddMMyyyy") & Right("00" + Trim(rsttable!idq), 2) & Right("00" + Trim(rsttable!idpos), 2) & Right("0000" + Trim(rsttable!idg), 4) & Right("0000" + Trim(rsttable!idf), 4) & Right("00" + Trim(rsttable!idts), 2) ; ""
rsttable.MoveNext
Wend
Close #1
rsttable.Close
****************************** ****************************** *************************
c'est le syntaxe normale
je veux que si j'incrimente le table cariére et je trouve deux matricules agaux
ce champ:
y = Format$(rsttable!DateDebut, "ddMMyyyy") & Format$(rsttable!DateFin, "ddMMyyyy") & Right("00" + Trim(rsttable!idq), 2) & Right("00" + Trim(rsttable!idpos), 2) & Right("0000" + Trim(rsttable!idg), 4) & Right("0000" + Trim(rsttable!idf), 4) & Right("00" + Trim(rsttable!idts), 2)
s'ajoute au premier ligne c'est à dire par exemple:
voici le contenu de fichier export
00000000080000000033flen foulen 03011979M310820093108200903030 033025602
00000000080000000033flen foulen 03011979M310820093108200903030 033025602
00000000081236547895alen alen 13072010M310820093108200903030 033025602
je veux que ça sera comme ça:
00000000080000000033flen foulen 03011979M310820093108200903030 033025602310820093108200903030 033025602
00000000081236547895alen alen 13072010M310820093108200903030 033025602
****************************** **********************
-----