Selasa, 04 Januari 2022

[MSAccessProfessionals] DoCmd.Transfer Import Specification

Happy New Year All.

I have a MS Access Macro that calls a VBA Module that has the following line of code for importing a text.csv file.

DoCmd.TransferText acImportDelim , "IMPORT_201223", TTFillsTableName, TTSourceFilePath, True

This works as designed. 

My understanding is that 
- "IMPORT_201223" is the import template (the CSV file has about 30 columns but only a dozen or so are imported)
and can confirm that
- TTFillsTableName is the name of the table that the file is imported into
- TTSourceFilePath is the source location of the CSV file being imported and
- True tells Access that the file has Field Names.

I want to change the import template (add additional columns to import) but if I go to the "External Data" tab, and look under "Saved Imports" I do not see this template. If I create and save a new import and then change the code above it gives me a 3625 run time error and tells me it can't find the newly defined text file specification, even though I can see that under the save imports tab.

Any suggestions?

Thanks as always

Sean


Tidak ada komentar:

Posting Komentar