Conversion .csv to Access (1 Viewer)

Harry_38

Registered User.
Local time
Today, 08:49
Joined
Jan 14, 2011
Messages
47
Access home built administration package.
Among others functions: I download new student entries from a website into a .csv file (comma separated)
The .csv file is then converted, in a number of VBA steps, into an Access table.

For years I have been using a module , but last month it stops at the folowing lines in the script:
DoCmd.TransferText TransferType:=acLinkDelim, TableName:="Download_org", _
FileName:="D:\vuadmin\download.csv", HasFieldNames:=True
I tried backups of the admin package in vain.

Could this error be caused by an update of Access or Windows10?

Any suggestions? pls help

Harry
 

plog

Banishment Pending
Local time
Today, 01:49
Joined
May 11, 2011
Messages
11,645
Probably an issue with the file. Perhaps someone changed the field names in it, changed their order, omitted a field, didn't escape text properly, etc. etc.

I would fire up a blank Access database and try to manually import that file by using the Wizard. Let's call that NewFile. If it works, I would go to a past file (OldFile) that worked without issue and import it into that same database. Then compare NewFile and OldFile to see if the fields imported in the same order, have the same names and use the same datatypes.
 

isladogs

MVP / VIP
Local time
Today, 07:49
Joined
Jan 14, 2017
Messages
18,216
I would suggest linking the CSV file then performing any necessary processing to import to your final table
 

Harry_38

Registered User.
Local time
Today, 08:49
Joined
Jan 14, 2011
Messages
47
Probably an issue with the file. Perhaps someone changed the field names in it, changed their order, omitted a field, didn't escape text properly, etc. etc.

I would fire up a blank Access database and try to manually import that file by using the Wizard. Let's call that NewFile. If it works, I would go to a past file (OldFile) that worked without issue and import it into that same database. Then compare NewFile and OldFile to see if the fields imported in the same order, have the same names and use the same datatypes.
Change in field names or their order, could well be. Thanks for the hint; I'll try it out
 

Harry_38

Registered User.
Local time
Today, 08:49
Joined
Jan 14, 2011
Messages
47
Creating a blank Access database with the necessary forms and queries took some time. When that was done, I found an typing error in VBA; no idea how it got there. I corrected the error and everything works again.
Thanks for the help.
 

Users who are viewing this thread

Top Bottom