I'm using VBA and a schema file to import a tab delimited text file into MS Access. Everything is working as it should, except the first field of the first record in the resulting access table is always null even though it contains a value in the text file.
The code is very simple:
sqlCmd = "SELECT * INTO [tblTemp] FROM [Text; Database=" & sDeskPath & ";].[" & Replace(sFileName, ".", "#") & "]"
CurrentDb.Execute sqlCmd, dbFailOnError
And the schema is correct:
[data.txt]
ColNameHeader=False
Format=TabDelimited
CharacterSet=ANSI
DateTimeFormat=YYYY-MM-DD
Col1=IssueID Long Width 10
Col2=Month Text Width 10
Col3=Year Long Width 5
...
I've done this successfully many times, but never encountered this issue. What on earth is causing the first value in the table to equal null??