PDA

View Full Version : Import FixedWidth with using schema for ADP



bkudulis
02-16-2009, 01:38 PM
I am trying to import a txt file into a adp file using a schema since adp files do not support specification name. Below is the vba code I am using but it does not recognize the schema to do the import. It gives the error "The text file specification 'schema.ini' does not exist. You cannot import, export, or link using this specification."






DoCmd.TransferText acImportFixed, "schema.ini", "tbl_Import_EBCUT", "M:\Eb_log\CTF\XPE\wbcut.txt"

orange
02-18-2009, 05:39 AM
I am trying to import a txt file into a adp file using a schema since adp files do not support specification name. Below is the vba code I am using but it does not recognize the schema to do the import. It gives the error "The text file specification 'schema.ini' does not exist. You cannot import, export, or link using this specification."






DoCmd.TransferText acImportFixed, "schema.ini", "tbl_Import_EBCUT", "M:\Eb_log\CTF\XPE\wbcut.txt"

Can you simply link the txt file?
If not, I think you should use the Get External Data, then on the advanced form use a Specification (fixed width). This will bring the data into a table. From there you can build/create the adp.

Look at help for Import or Link Data and objects - import or link a delimited or fixed width text file.