Privateer
Registered User.
- Local time
- Today, 16:31
- Joined
- Aug 16, 2011
- Messages
- 193
Hello all, first post here. I hate to trouble you with a text import problem, but this will save a lot of time if we can make it work. Let me also mention that I am aware of saving the spec files during a manual import, but the front end is being passed around and each person could create a different spec file or overwrite one that works.
I have code to create a schema.ini file and that works fine. The delimiter is a pipe. But the transfer text line says the file does not exist. The import and schema files are both in the same folder and I can't figure out what is wrong. As always any help is appreciated
Michael
Schema:
[Header.txt]
MaxScanRows = 5
ColNameHeader = False
CharacterSet = ANSI
Format = Delimited(|)
Col1 = Field1 Text
Col2 = HeadingID Text
Col3 = Field3 Text
Col4 = Created Text
Col5 = Creator Text
Col6 = Changed Text
Col7 = Changer Text
Col8 = Specification Text
Col9 = SpecType Text
Col10 = AtthorGroup Text
Col11 = Modified Text
Col12 = Modifier Text
Error on this line:
DoCmd.TransferText acImportDelim, Destination, TargetTable, TargetFile, False
Immediate window values:
? destination
D:\PersonalData\ConroMia\Documents\Databases\Extracts\Schema.ini
? targettable
tblHeader
? targetfile
D:\PersonalData\ConroMia\Documents\Databases\Extracts\Header.txt
? err.Description
The text file specification 'D
ersonalDataConroMiaDocumentsDatabasesExtractsSchema.ini' does not exist. You cannot import, export, or link using the specification.
I have code to create a schema.ini file and that works fine. The delimiter is a pipe. But the transfer text line says the file does not exist. The import and schema files are both in the same folder and I can't figure out what is wrong. As always any help is appreciated
Michael
Schema:
[Header.txt]
MaxScanRows = 5
ColNameHeader = False
CharacterSet = ANSI
Format = Delimited(|)
Col1 = Field1 Text
Col2 = HeadingID Text
Col3 = Field3 Text
Col4 = Created Text
Col5 = Creator Text
Col6 = Changed Text
Col7 = Changer Text
Col8 = Specification Text
Col9 = SpecType Text
Col10 = AtthorGroup Text
Col11 = Modified Text
Col12 = Modifier Text
Error on this line:
DoCmd.TransferText acImportDelim, Destination, TargetTable, TargetFile, False
Immediate window values:
? destination
D:\PersonalData\ConroMia\Documents\Databases\Extracts\Schema.ini
? targettable
tblHeader
? targetfile
D:\PersonalData\ConroMia\Documents\Databases\Extracts\Header.txt
? err.Description
The text file specification 'D
