View Single Post
 
Old 02-06-2019, 12:54 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote