I suspect the file save error is due to the presence of something other than 0, 1, 2, or 3 in your Anz column.
As for the change in the ID number order, that's most likely because the OLEDB driver interprets your 2019.02.06 as a date and is changing the output to a date in US date format. Even if the periods weren't being replaced with underscores you'd have that problem. If numbers like 2019.02.06 are all your ID field contains, you may be able to work around that by changing:
StrName = .DataFields("ID")
to:
StrName = Format(.DataFields("ID"), "YYYY_MM_DD")
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|