Hi, I have been looking around and it seems like every few months someone has a problem working with a schema.ini file but I can't seem to resolve mine with the other information I've found to this point.
The problem that I am having is a keep getting the message: "Field 'F1' doesn't exist in destination table 'tblTest'." Which is quite true. I don't know where it is acquiring a fieldname of F1 from anywhere as I don't have one anywhere.
Here is my schema.ini
Here is my Input.txt file:
Here is my vba code
The Input.txt and schema.ini are both in the same folder. I tried putting the column names in quotes, but that didn't change anything (and it looks like they aren't supposed to be quoted from the information I've seen, anyway).
As always, any help is appreciated. Many thanks.
"Maturity is a bitter disappointment for which no remedy exists, unless laughter can be said to remedy anything."
-Vonnegut
The problem that I am having is a keep getting the message: "Field 'F1' doesn't exist in destination table 'tblTest'." Which is quite true. I don't know where it is acquiring a fieldname of F1 from anywhere as I don't have one anywhere.
Here is my schema.ini
Code:
[Input.txt]
ColNameHeader=False
CharacterSet=ANSI
Format=Delimited(|)
MaxScanRows=0
Col1=Number1 Long
Col2=Number2 Long
Col3=Number3 Long
Col4=TextA Text
Col5=TextB Text
Col6=TextC Text
Col7=TextD Text
Col8=TextE Text
Here is my Input.txt file:
Code:
1|0|5|a|b|c|d|e
2|9|4|f|g|h|i|j
Here is my vba code
Code:
Private Sub btnImport_Click()
DoCmd.TransferText acImportDelim, , "tblTest", "C:\Documents and Settings\mblupton\My Documents\Test\Input.txt"
End Sub
The Input.txt and schema.ini are both in the same folder. I tried putting the column names in quotes, but that didn't change anything (and it looks like they aren't supposed to be quoted from the information I've seen, anyway).
As always, any help is appreciated. Many thanks.
"Maturity is a bitter disappointment for which no remedy exists, unless laughter can be said to remedy anything."
-Vonnegut