TransferText problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to define and save a 'specification name' for later use by a macro (in
my Access Project) that will import a text file every month. However, when I
am importing the prototype, the 'Import Specification' window (that opens
from the 'Advanced' button on the 'Import Text Wizard') has the 'Save As' and
'Specs' buttons disabled. This is true no matter what stage of defining the
specification I am at when I open this window. So, I can't see how to save
the specification.
 
I've answered my own question with another one. I see that specifications
can't used with the Wizard for ADP's, so I'm trying to save one using a
Schema.ini file. But, I can't get past error 31519: "You cannot import this
file."

I suppose I've got a syntax issue. My Schema.ini file contains:

[STOCKR_test.txt]
Format=FixedLength
ColNameHeader=True
MaxScanRows=10
Col1=Location Char Width 4
Col2=Franchise Char Width 4
Col3=StockNo Char Width 16
Col4=RegRank Char Width 2
Col5=stuff Char Width 22
Col6=ParentSS Integer Width 6

I've tried
DoCmd.TransferText acImportFixed, "Schema.ini", "STOCKR_test.txt", False
DoCmd.TransferText acImportFixed, "STOCKR_test.txt", "STOCKR_test.txt",
False

and
DoCmd.TransferText acImportFixed, "STOCKR_test", "STOCKR_test.txt", False
(after changing the 1st line of Schema.ini to "[STOCKR_test]")

but I don't know what else to try.
 
Back
Top